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):