From 41ba27fefdd313333d94408802afff36a9eedb83 Mon Sep 17 00:00:00 2001 From: Zoltan Gyarmati Date: Tue, 7 Feb 2017 10:17:36 +0100 Subject: Fixed #27815 -- Made LoginView pass the request kwarg to AuthenticationForm. --- tests/auth_tests/test_views.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py index 7436473635..8f946a9a38 100644 --- a/tests/auth_tests/test_views.py +++ b/tests/auth_tests/test_views.py @@ -594,13 +594,14 @@ class LoginTest(AuthViewsTestCase): self.assertEqual(response.url, settings.LOGIN_REDIRECT_URL) def test_login_form_contains_request(self): - # 15198 - self.client.post('/custom_requestauth_login/', { + # The custom authentication form for this login requires a request to + # initialize it. + response = self.client.post('/custom_request_auth_login/', { 'username': 'testclient', 'password': 'password', - }, follow=True) - # the custom authentication form used by this login asserts - # that a request is passed to the form successfully. + }) + # The login was successful. + self.assertRedirects(response, settings.LOGIN_REDIRECT_URL, fetch_redirect_response=False) def test_login_csrf_rotate(self): """ -- cgit v1.3