diff options
Diffstat (limited to 'tests/auth_tests')
| -rw-r--r-- | tests/auth_tests/test_forms.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auth_tests/test_forms.py b/tests/auth_tests/test_forms.py index dde639dc01..28a40db852 100644 --- a/tests/auth_tests/test_forms.py +++ b/tests/auth_tests/test_forms.py @@ -236,6 +236,16 @@ class UserCreationFormTest(TestDataMixin, TestCase): self.assertEqual(form.cleaned_data['password1'], data['password1']) self.assertEqual(form.cleaned_data['password2'], data['password2']) + @override_settings(AUTH_PASSWORD_VALIDATORS=[ + {'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'}, + ]) + def test_password_help_text(self): + form = UserCreationForm() + self.assertEqual( + form.fields['password1'].help_text, + '<ul><li>Your password can't be too similar to your other personal information.</li></ul>' + ) + # To verify that the login form rejects inactive users, use an authentication # backend that allows them. |
