def assertStatusCode200(response, msg=None):
self.assertEqual(response.status_code, 200, msg)
def assertStatusCode302(response, msg=None):
self.assertEqual(response.status_code, 302, msg)
def assertStatusCode404(response, msg=None):
self.assertEqual(response.status_code, 404, msg)
Created some custom asserts to check 200, 302 and 404 status code in the responses while testing get's or posts
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.