diff options
Diffstat (limited to 'tests/auth_tests')
| -rw-r--r-- | tests/auth_tests/test_mixins.py | 4 | ||||
| -rw-r--r-- | tests/auth_tests/test_models.py | 2 | ||||
| -rw-r--r-- | tests/auth_tests/test_validators.py | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/auth_tests/test_mixins.py b/tests/auth_tests/test_mixins.py index 04cedcd9cf..5f0379bcd0 100644 --- a/tests/auth_tests/test_mixins.py +++ b/tests/auth_tests/test_mixins.py @@ -7,7 +7,7 @@ from django.contrib.auth.mixins import ( from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied from django.http import HttpResponse -from django.test import RequestFactory, TestCase +from django.test import RequestFactory, SimpleTestCase, TestCase from django.views.generic import View @@ -111,7 +111,7 @@ class AccessMixinTests(TestCase): view(request) -class UserPassesTestTests(TestCase): +class UserPassesTestTests(SimpleTestCase): factory = RequestFactory() diff --git a/tests/auth_tests/test_models.py b/tests/auth_tests/test_models.py index 7bee3d7d31..8387c5f9ee 100644 --- a/tests/auth_tests/test_models.py +++ b/tests/auth_tests/test_models.py @@ -156,7 +156,7 @@ class UserManagerTestCase(TestCase): self.assertIn(char, allowed_chars) -class AbstractBaseUserTests(TestCase): +class AbstractBaseUserTests(SimpleTestCase): def test_has_usable_password(self): """ 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 = [ |
