Commit be67400b authored by Simon Charette's avatar Simon Charette
Browse files

Refs #24652 -- Used SimpleTestCase where appropriate.

parent e2b77ace
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
from django.db import models
from django.test import TestCase
from django.test import SimpleTestCase


class AbsoluteUrlOverrideTests(TestCase):
class AbsoluteUrlOverrideTests(SimpleTestCase):

    def test_get_absolute_url(self):
        """
+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ from django import forms
from django.contrib import admin
from django.contrib.contenttypes.admin import GenericStackedInline
from django.core import checks
from django.test import TestCase, override_settings
from django.test import SimpleTestCase, override_settings

from .models import Album, Book, City, Influence, Song, State, TwoAlbumFKAndAnE

@@ -41,7 +41,7 @@ class MyAdmin(admin.ModelAdmin):
    SILENCED_SYSTEM_CHECKS=['fields.W342'],  # ForeignKey(unique=True)
    INSTALLED_APPS=['django.contrib.auth', 'django.contrib.contenttypes', 'admin_checks']
)
class SystemChecksTestCase(TestCase):
class SystemChecksTestCase(SimpleTestCase):

    @override_settings(DEBUG=True)
    def test_checks_are_performed(self):
+3 −3
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ from django.contrib import admin
from django.contrib.admin.decorators import register
from django.contrib.admin.sites import site
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase
from django.test import SimpleTestCase

from .models import Location, Person, Place, Traveler

@@ -18,7 +18,7 @@ class CustomSite(admin.AdminSite):
    pass


class TestRegistration(TestCase):
class TestRegistration(SimpleTestCase):
    def setUp(self):
        self.site = admin.AdminSite()

@@ -80,7 +80,7 @@ class TestRegistration(TestCase):
        self.assertFalse(self.site.is_registered(Person))


class TestRegistrationDecorator(TestCase):
class TestRegistrationDecorator(SimpleTestCase):
    """
    Tests the register decorator in admin.decorators

+4 −2
Original line number Diff line number Diff line
@@ -25,7 +25,9 @@ from django.core.management import (
from django.db import ConnectionHandler
from django.db.migrations.exceptions import MigrationSchemaMissing
from django.db.migrations.recorder import MigrationRecorder
from django.test import LiveServerTestCase, TestCase, mock, override_settings
from django.test import (
    LiveServerTestCase, SimpleTestCase, mock, override_settings,
)
from django.test.runner import DiscoverRunner
from django.utils._os import npath, upath
from django.utils.encoding import force_text
@@ -1695,7 +1697,7 @@ class CommandTypes(AdminScriptTestCase):
        self.assertOutput(out, "EXECUTE:LabelCommand label=anotherlabel, options=[('no_color', False), ('pythonpath', None), ('settings', None), ('traceback', False), ('verbosity', 1)]")


class Discovery(TestCase):
class Discovery(SimpleTestCase):

    def test_precedence(self):
        """
+3 −2
Original line number Diff line number Diff line
@@ -27,7 +27,8 @@ from django.forms.utils import ErrorList
from django.template.loader import render_to_string
from django.template.response import TemplateResponse
from django.test import (
    TestCase, modify_settings, override_settings, skipUnlessDBFeature,
    SimpleTestCase, TestCase, modify_settings, override_settings,
    skipUnlessDBFeature,
)
from django.test.utils import override_script_prefix, patch_logger
from django.utils import formats, six, translation
@@ -6150,7 +6151,7 @@ class InlineAdminViewOnSiteTest(TestCase):


@override_settings(ROOT_URLCONF="admin_views.urls")
class TestEtagWithAdminView(TestCase):
class TestEtagWithAdminView(SimpleTestCase):
    # See https://code.djangoproject.com/ticket/16003

    def test_admin(self):
Loading