Skip to content
Snippets Groups Projects
Commit 13b71e69 authored by Ben Adida's avatar Ben Adida
Browse files

fixed tests for version of test library

parent aebc996a
No related branches found
No related tags found
No related merge requests found
...@@ -353,15 +353,17 @@ class WebTest(django_webtest.WebTest): ...@@ -353,15 +353,17 @@ class WebTest(django_webtest.WebTest):
assert url in response.location assert url in response.location
else: else:
assert url in response._headers['location'][1] assert url in response._headers['location'][1]
self.assertEqual(response.status_code, 302)
if hasattr(response, 'status_code'):
assert response.status_code == 302
else:
assert response.status_int == 302
#self.assertEqual(response.status_code, 302)
#return super(django_webtest.WebTest, self).assertRedirects(response, url) #return super(django_webtest.WebTest, self).assertRedirects(response, url)
#if hasattr(response, 'status_code') and hasattr(response, 'location'): #if hasattr(response, 'status_code') and hasattr(response, 'location'):
#if hasattr(response, 'status_code'):
# assert response.status_code == 302
#else:
# assert response.status_int == 302
#assert url in response.location, "redirected to %s instead of %s" % (response.location, url) #assert url in response.location, "redirected to %s instead of %s" % (response.location, url)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment