diff --git a/helios/tests.py b/helios/tests.py index 84132366bbe4655ec86cab3d540d3768845ee6be..85d9b819f81e3aec01c2f74fca6ee6e9b4cf74e8 100644 --- a/helios/tests.py +++ b/helios/tests.py @@ -353,15 +353,17 @@ class WebTest(django_webtest.WebTest): assert url in response.location else: 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) #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)