summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_forms.py
diff options
context:
space:
mode:
authorAlexander Gaevsky <sasha@sasha0.ru>2016-02-05 16:46:19 +0200
committerTim Graham <timograham@gmail.com>2016-03-23 09:01:48 -0400
commite0a3d937309a82b8beea8f41b17d8b6298da2a86 (patch)
tree0e6cd936b358687686a1f3b99b726da3c6a5ac5f /tests/auth_tests/test_forms.py
parent1555d50ea40f22524b58e71bf15f3fc69a7c9591 (diff)
Fixed #25232 -- Made ModelBackend/RemoteUserBackend reject inactive users.
Diffstat (limited to 'tests/auth_tests/test_forms.py')
-rw-r--r--tests/auth_tests/test_forms.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auth_tests/test_forms.py b/tests/auth_tests/test_forms.py
index f43a814c88..0e0ba71504 100644
--- a/tests/auth_tests/test_forms.py
+++ b/tests/auth_tests/test_forms.py
@@ -166,6 +166,9 @@ class UserCreationFormTest(TestDataMixin, TestCase):
self.assertEqual(form.cleaned_data['password2'], data['password2'])
+# To verify that the login form rejects inactive users, use an authentication
+# backend that allows them.
+@override_settings(AUTHENTICATION_BACKENDS=['django.contrib.auth.backends.AllowAllUsersModelBackend'])
class AuthenticationFormTest(TestDataMixin, TestCase):
def test_invalid_username(self):