Fixed #16413 -- Stopped an auth test from failing if LOGIN_URL is set to a non-default value. Thanks, Aymeric Augustin.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2011-07-26 08:27:23 +00:00
parent 34a71dc4e4
commit 6b80640fd7
1 changed files with 4 additions and 3 deletions

View File

@ -205,6 +205,7 @@ class ChangePasswordTest(AuthViewsTestCase):
self.assertTrue(response['Location'].endswith('/password_change/done/')) self.assertTrue(response['Location'].endswith('/password_change/done/'))
def test_password_change_done_fails(self): def test_password_change_done_fails(self):
with self.settings(LOGIN_URL='/login/'):
response = self.client.get('/password_change/done/') response = self.client.get('/password_change/done/')
self.assertEqual(response.status_code, 302) self.assertEqual(response.status_code, 302)
self.assertTrue(response['Location'].endswith('/login/?next=/password_change/done/')) self.assertTrue(response['Location'].endswith('/login/?next=/password_change/done/'))