So I have a page that is expected to return content or return a 403 page in django
response = self.client.get(...)
print response.status_code
print type(response.status_code)
assert response.status_code is 200
print "WHAT IS GOING ON!?!?!?!"
response = self.client.get(...)
code = response.status_code
print code
print type(code)
assert code is 403
print "hmm"
Which returns the output:
200
<type 'int'>
WHAT IS GOING ON!?!?!?!
403
<type 'int'>
Clearly the code is failing at assert code is 403
but I can't imagine why. I even sanity checked myself by changing the line to assert 403 is 403
and the test passed. I'm new to Python and Django so I might be missing something obvious.