summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2011-07-26 08:27:23 +0000
committerJannis Leidel <jannis@leidel.info>2011-07-26 08:27:23 +0000
commit6b80640fd7184352998414b33caf7b8f8671cb30 (patch)
tree63d7350907e045e2dd6845f02066ecaa0dfadfc1
parent34a71dc4e4c1f09da7fd47a566c4ae5965bc2f42 (diff)
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
-rw-r--r--django/contrib/auth/tests/views.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/django/contrib/auth/tests/views.py b/django/contrib/auth/tests/views.py
index 1011671fe6..832b65b952 100644
--- a/django/contrib/auth/tests/views.py
+++ b/django/contrib/auth/tests/views.py
@@ -205,9 +205,10 @@ class ChangePasswordTest(AuthViewsTestCase):
self.assertTrue(response['Location'].endswith('/password_change/done/'))
def test_password_change_done_fails(self):
- response = self.client.get('/password_change/done/')
- self.assertEqual(response.status_code, 302)
- self.assertTrue(response['Location'].endswith('/login/?next=/password_change/done/'))
+ with self.settings(LOGIN_URL='/login/'):
+ response = self.client.get('/password_change/done/')
+ self.assertEqual(response.status_code, 302)
+ self.assertTrue(response['Location'].endswith('/login/?next=/password_change/done/'))
class LoginTest(AuthViewsTestCase):