mirror of
https://github.com/Hopiu/django-tos.git
synced 2026-03-16 20:10:24 +00:00
Use response.url instead of digging through mock response headers
This commit is contained in:
parent
c9923e1639
commit
eb25a40c07
1 changed files with 1 additions and 1 deletions
|
|
@ -89,7 +89,7 @@ class TestViews(TestCase):
|
|||
response = self.client.post(self.login_url, dict(username='user1',
|
||||
password='user1pass', next='http://example.com'))
|
||||
self.assertEqual(302, response.status_code)
|
||||
self.assertIn(settings.LOGIN_REDIRECT_URL, response._headers['location'][1])
|
||||
self.assertIn(settings.LOGIN_REDIRECT_URL, response.url)
|
||||
|
||||
def test_need_to_log_in(self):
|
||||
""" GET to login url shows login tempalte."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue