Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed a test that could fail depending on PASSWORD_HASHERS.

Thanks Claude. Refs #20760.
  • Loading branch information...
commit 5b47a9c5a0dcb513dc5ff68b617b3aa374c90f3b 1 parent 7b57e57
@aaugustin aaugustin authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 django/contrib/auth/tests/
4 django/contrib/auth/tests/
@@ -125,6 +125,10 @@ def test_get_all_superuser_permissions(self):
def test_authentication_timing(self):
"""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')
CountingMD5PasswordHasher.calls = 0
username = getattr(self.user, self.UserModel.USERNAME_FIELD)
authenticate(username=username, password='test')

0 comments on commit 5b47a9c

Please sign in to comment.
Something went wrong with that request. Please try again.