Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


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 67,986 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.