diff options
| author | Tim Graham <timograham@gmail.com> | 2018-11-26 14:05:02 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-11-27 08:58:44 -0500 |
| commit | 193c109327c5216cab1d4eed6bfdff24629b09a3 (patch) | |
| tree | 3428f61d610f51349df5ab6eb26a4876b54878c5 /tests/auth_tests/test_validators.py | |
| parent | f091ea35150d95fc6732bbf0c27b971dd445509a (diff) | |
Switched TestCase to SimpleTestCase where possible in Django's tests.
Diffstat (limited to 'tests/auth_tests/test_validators.py')
| -rw-r--r-- | tests/auth_tests/test_validators.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auth_tests/test_validators.py b/tests/auth_tests/test_validators.py index b29f64766b..1c2c6b4aff 100644 --- a/tests/auth_tests/test_validators.py +++ b/tests/auth_tests/test_validators.py @@ -11,7 +11,7 @@ from django.contrib.auth.password_validation import ( ) from django.core.exceptions import ValidationError from django.db import models -from django.test import TestCase, override_settings +from django.test import SimpleTestCase, TestCase, override_settings from django.test.utils import isolate_apps from django.utils.html import conditional_escape @@ -22,7 +22,7 @@ from django.utils.html import conditional_escape 'min_length': 12, }}, ]) -class PasswordValidationTest(TestCase): +class PasswordValidationTest(SimpleTestCase): def test_get_default_password_validators(self): validators = get_default_password_validators() self.assertEqual(len(validators), 2) @@ -95,7 +95,7 @@ class PasswordValidationTest(TestCase): self.assertEqual(password_validators_help_text_html(), '') -class MinimumLengthValidatorTest(TestCase): +class MinimumLengthValidatorTest(SimpleTestCase): def test_validate(self): expected_error = "This password is too short. It must contain at least %d characters." self.assertIsNone(MinimumLengthValidator().validate('12345678')) @@ -182,7 +182,7 @@ class UserAttributeSimilarityValidatorTest(TestCase): ) -class CommonPasswordValidatorTest(TestCase): +class CommonPasswordValidatorTest(SimpleTestCase): def test_validate(self): expected_error = "This password is too common." self.assertIsNone(CommonPasswordValidator().validate('a-safe-password')) @@ -214,7 +214,7 @@ class CommonPasswordValidatorTest(TestCase): ) -class NumericPasswordValidatorTest(TestCase): +class NumericPasswordValidatorTest(SimpleTestCase): def test_validate(self): expected_error = "This password is entirely numeric." self.assertIsNone(NumericPasswordValidator().validate('a-safe-password')) @@ -231,7 +231,7 @@ class NumericPasswordValidatorTest(TestCase): ) -class UsernameValidatorsTests(TestCase): +class UsernameValidatorsTests(SimpleTestCase): def test_unicode_validator(self): valid_usernames = ['joe', 'René', 'ᴮᴵᴳᴮᴵᴿᴰ', 'أحمد'] invalid_usernames = [ |
