mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Refs #16860 -- Fixed password help text when there aren't any validators.
This avoids creating an empty list which is invalid HTML 4.
This commit is contained in:
committed by
Tim Graham
parent
c14b6b52ff
commit
53ccffdb8c
@@ -68,6 +68,10 @@ class PasswordValidationTest(TestCase):
|
||||
self.assertEqual(help_text.count('<li>'), 2)
|
||||
self.assertIn('12 characters', help_text)
|
||||
|
||||
@override_settings(AUTH_PASSWORD_VALIDATORS=[])
|
||||
def test_empty_password_validator_help_text_html(self):
|
||||
self.assertEqual(password_validators_help_text_html(), '')
|
||||
|
||||
|
||||
class MinimumLengthValidatorTest(TestCase):
|
||||
def test_validate(self):
|
||||
|
||||
Reference in New Issue
Block a user