Refs #24652 -- Used SimpleTestCase where appropriate.

This commit is contained in:
Simon Charette 2015-04-17 17:38:20 -04:00
parent e2b77acedd
commit be67400b47
93 changed files with 362 additions and 340 deletions

View file

@ -12,7 +12,9 @@ from django.contrib.auth.tests.custom_user import CustomUser, ExtensionUser
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
from django.http import HttpRequest
from django.test import TestCase, modify_settings, override_settings
from django.test import (
SimpleTestCase, TestCase, modify_settings, override_settings,
)
from .models import CustomPermissionsUser, UUIDUser
@ -394,7 +396,7 @@ class RowlevelBackendTest(TestCase):
@override_settings(
AUTHENTICATION_BACKENDS=['auth_tests.test_auth_backends.SimpleRowlevelBackend'],
)
class AnonymousUserBackendTest(TestCase):
class AnonymousUserBackendTest(SimpleTestCase):
"""
Tests for AnonymousUser delegating to backend.
"""

View file

@ -5,7 +5,7 @@ from django.contrib.auth.context_processors import PermLookupDict, PermWrapper
from django.contrib.auth.models import Permission, User
from django.contrib.contenttypes.models import ContentType
from django.db.models import Q
from django.test import TestCase, override_settings
from django.test import SimpleTestCase, TestCase, override_settings
from .settings import AUTH_MIDDLEWARE_CLASSES, AUTH_TEMPLATES
@ -22,7 +22,7 @@ class MockUser(object):
return False
class PermWrapperTests(TestCase):
class PermWrapperTests(SimpleTestCase):
"""
Test some details of the PermWrapper implementation.
"""

View file

@ -14,7 +14,7 @@ from django.contrib.sites.models import Site
from django.core import mail
from django.core.mail import EmailMultiAlternatives
from django.forms.fields import CharField, Field
from django.test import TestCase, override_settings
from django.test import SimpleTestCase, TestCase, override_settings
from django.utils import translation
from django.utils.encoding import force_text
from django.utils.text import capfirst
@ -553,7 +553,7 @@ class PasswordResetFormTest(TestDataMixin, TestCase):
)
class ReadOnlyPasswordHashTest(TestCase):
class ReadOnlyPasswordHashTest(SimpleTestCase):
def test_bug_19349_render_with_none_value(self):
# Rendering the widget with value set to None

View file

@ -17,7 +17,9 @@ from django.contrib.contenttypes.models import ContentType
from django.core import checks, exceptions
from django.core.management import call_command
from django.core.management.base import CommandError
from django.test import TestCase, override_settings, override_system_checks
from django.test import (
SimpleTestCase, TestCase, override_settings, override_system_checks,
)
from django.utils import six
from django.utils.encoding import force_str
from django.utils.translation import ugettext_lazy as _
@ -415,7 +417,7 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
test(self)
class CustomUserModelValidationTestCase(TestCase):
class CustomUserModelValidationTestCase(SimpleTestCase):
@override_settings(AUTH_USER_MODEL='auth.CustomUserNonListRequiredFields')
@override_system_checks([check_user_model])
def test_required_fields_is_list(self):