From 45078a204bb917ed84e7bafa287f019472581ff1 Mon Sep 17 00:00:00 2001 From: Lily Foote Date: Tue, 19 Sep 2023 21:38:13 +0100 Subject: [PATCH] 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. --- tests/auth_tests/test_views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py index d15a166c98..ba0a77a4dc 100644 --- a/tests/auth_tests/test_views.py +++ b/tests/auth_tests/test_views.py @@ -1361,7 +1361,10 @@ def get_perm(Model, perm): # Redirect in test_user_change_password will fail if session auth hash # 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): @classmethod def setUpTestData(cls):