Defined PASSWORD_HASHERS for auth_tests.test_views.ChangelistTests.

auth_tests.test_views.ChangelistTests.test_view_user_password_is_readonly
depends on the password hasher having the three components algorithm,
salt and hash.

The default password hasher (PBKDF2PasswordHasher) has an extra
iterations component, breaking the test.
This commit is contained in:
Lily Foote 2023-09-19 21:38:13 +01:00 committed by Mariusz Felisiak
parent 3623a0c079
commit 45078a204b
1 changed files with 4 additions and 1 deletions

View File

@ -1361,7 +1361,10 @@ def get_perm(Model, perm):
# Redirect in test_user_change_password will fail if session auth hash # Redirect in test_user_change_password will fail if session auth hash
# isn't updated after password change (#21649) # isn't updated after password change (#21649)
@override_settings(ROOT_URLCONF="auth_tests.urls_admin") @override_settings(
ROOT_URLCONF="auth_tests.urls_admin",
PASSWORD_HASHERS=["django.contrib.auth.hashers.MD5PasswordHasher"],
)
class ChangelistTests(AuthViewsTestCase): class ChangelistTests(AuthViewsTestCase):
@classmethod @classmethod
def setUpTestData(cls): def setUpTestData(cls):