summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_auth_backends.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auth_tests/test_auth_backends.py')
-rw-r--r--tests/auth_tests/test_auth_backends.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/auth_tests/test_auth_backends.py b/tests/auth_tests/test_auth_backends.py
index 32fb092cf4..0ba169249b 100644
--- a/tests/auth_tests/test_auth_backends.py
+++ b/tests/auth_tests/test_auth_backends.py
@@ -457,7 +457,9 @@ class BaseModelBackendTest:
PASSWORD_HASHERS=["auth_tests.test_auth_backends.CountingMD5PasswordHasher"]
)
def test_authentication_timing(self):
- """Hasher is run once regardless of whether the user exists. Refs #20760."""
+ """
+ Hasher is run once regardless of whether the user exists. Refs #20760.
+ """
# Re-set the password, because this tests overrides PASSWORD_HASHERS
self.user.set_password("test")
self.user.save()
@@ -875,7 +877,8 @@ class InActiveUserBackendTest(TestCase):
class PermissionDeniedBackend:
"""
- Always raises PermissionDenied in `authenticate`, `has_perm` and `has_module_perms`.
+ Always raises PermissionDenied in `authenticate`, `has_perm` and
+ `has_module_perms`.
"""
def authenticate(self, request, username=None, password=None):
@@ -920,7 +923,10 @@ class PermissionDeniedBackendTest(TestCase):
@modify_settings(AUTHENTICATION_BACKENDS={"prepend": backend})
def test_permission_denied(self):
- "user is not authenticated after a backend raises permission denied #2550"
+ """
+ user is not authenticated after a backend raises permission denied
+ #2550
+ """
self.assertIsNone(authenticate(username="test", password="test"))
# user_login_failed signal is sent.
self.assertEqual(