Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Sagar Thakkar
Sagar Thakkar
8,814 Points

can you help me to understand line no 52 self.assertEqual(resp.status_code,200)

as i am thinking now that resp is an some kind of function witch give a response of 200

1 Answer

Chris Freeman
Chris Freeman
Treehouse Moderator 68,404 Points

I'm guessing that resp is an object defined previously in the code to hold the response from a web request.

resp.status_code holds the response status, such as, 200 (OK), 404 (Not Found), 500 (Server error).

The assertEqual will raise an error if the status_code does not match the expected value 200.