Loading django/contrib/auth/tests/forms.py +3 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,9 @@ class AuthenticationFormTest(TestCase): form = AuthenticationForm(None, data) self.assertFalse(form.is_valid()) self.assertEqual(form.non_field_errors(), [force_text(form.error_messages['invalid_login'])]) [force_text(form.error_messages['invalid_login'] % { 'username': User._meta.get_field('username').verbose_name })]) def test_inactive_user(self): # The user is inactive. Loading django/contrib/auth/tests/views.py +3 −1 Original line number Diff line number Diff line Loading @@ -248,7 +248,9 @@ class ChangePasswordTest(AuthViewsTestCase): 'username': 'testclient', 'password': password, }) self.assertContainsEscaped(response, AuthenticationForm.error_messages['invalid_login']) self.assertContainsEscaped(response, AuthenticationForm.error_messages['invalid_login'] % { 'username': User._meta.get_field('username').verbose_name }) def logout(self): response = self.client.get('/logout/') Loading tests/regressiontests/admin_views/tests.py +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ from .models import (Article, BarAccount, CustomArticle, EmptyModel, FooAccount, ERROR_MESSAGE = "Please enter the correct username and password \ for a staff account. Note that both fields are case-sensitive." for a staff account. Note that both fields may be case-sensitive." @override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',)) Loading Loading
django/contrib/auth/tests/forms.py +3 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,9 @@ class AuthenticationFormTest(TestCase): form = AuthenticationForm(None, data) self.assertFalse(form.is_valid()) self.assertEqual(form.non_field_errors(), [force_text(form.error_messages['invalid_login'])]) [force_text(form.error_messages['invalid_login'] % { 'username': User._meta.get_field('username').verbose_name })]) def test_inactive_user(self): # The user is inactive. Loading
django/contrib/auth/tests/views.py +3 −1 Original line number Diff line number Diff line Loading @@ -248,7 +248,9 @@ class ChangePasswordTest(AuthViewsTestCase): 'username': 'testclient', 'password': password, }) self.assertContainsEscaped(response, AuthenticationForm.error_messages['invalid_login']) self.assertContainsEscaped(response, AuthenticationForm.error_messages['invalid_login'] % { 'username': User._meta.get_field('username').verbose_name }) def logout(self): response = self.client.get('/logout/') Loading
tests/regressiontests/admin_views/tests.py +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ from .models import (Article, BarAccount, CustomArticle, EmptyModel, FooAccount, ERROR_MESSAGE = "Please enter the correct username and password \ for a staff account. Note that both fields are case-sensitive." for a staff account. Note that both fields may be case-sensitive." @override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',)) Loading