From 536db42cf01ebe0dd633b131c3dbfc0bf743064f Mon Sep 17 00:00:00 2001 From: Alexander Gaevsky Date: Thu, 14 Apr 2016 20:12:30 +0300 Subject: Fixed #26097 -- Added password_validators_help_text_html to UserCreationForm. --- tests/auth_tests/test_forms.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') 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, + '' + ) + # To verify that the login form rejects inactive users, use an authentication # backend that allows them. -- cgit v1.3