summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_validators.py
diff options
context:
space:
mode:
authorAntoine Catton <acatton@fusionbox.com>2015-09-25 15:32:23 -0600
committerTim Graham <timograham@gmail.com>2015-09-28 15:31:18 -0400
commitdb88e40312dfba8d32203a0990792a4a9840f6a7 (patch)
treec81c6292ab1873a246a26ee1595a05e1db12604e /tests/auth_tests/test_validators.py
parent0094fb6be8e0f0831e2f3e3e1b36900cf60f6785 (diff)
[1.9.x] Refs #16860 -- Fixed password help text when there aren't any validators.
This avoids creating an empty list which is invalid HTML 4. Backport of 53ccffdb8c8e47a4d4304df453d8c79a9be295ab from master
Diffstat (limited to 'tests/auth_tests/test_validators.py')
-rw-r--r--tests/auth_tests/test_validators.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auth_tests/test_validators.py b/tests/auth_tests/test_validators.py
index e70feb727d..a9f47eac1f 100644
--- a/tests/auth_tests/test_validators.py
+++ b/tests/auth_tests/test_validators.py
@@ -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):