Kaydet (Commit) bbc3505e authored tarafından Claude Paroz's avatar Claude Paroz

Removed unneeded override_system_checks

Refs #23685.
üst 8b4cc9df
...@@ -3,8 +3,7 @@ from __future__ import unicode_literals ...@@ -3,8 +3,7 @@ from __future__ import unicode_literals
from django.core.management import call_command from django.core.management import call_command
from django.db import connection from django.db import connection
from django.test import ( from django.test import (
override_settings, override_system_checks, skipUnlessDBFeature, override_settings, skipUnlessDBFeature, TransactionTestCase
TransactionTestCase
) )
...@@ -27,7 +26,6 @@ class MigrateTests(TransactionTestCase): ...@@ -27,7 +26,6 @@ class MigrateTests(TransactionTestCase):
with connection.cursor() as cursor: with connection.cursor() as cursor:
self.assertNotIn(table, connection.introspection.table_names(cursor)) self.assertNotIn(table, connection.introspection.table_names(cursor))
@override_system_checks([])
@override_settings(MIGRATION_MODULES={"gis": "django.contrib.gis.tests.gis_migrations.migrations"}) @override_settings(MIGRATION_MODULES={"gis": "django.contrib.gis.tests.gis_migrations.migrations"})
def test_migrate_gis(self): def test_migrate_gis(self):
""" """
......
...@@ -5,7 +5,6 @@ import warnings ...@@ -5,7 +5,6 @@ import warnings
from django.core import management from django.core import management
from django.db import transaction from django.db import transaction
from django.test import TestCase, TransactionTestCase from django.test import TestCase, TransactionTestCase
from django.test.utils import override_system_checks
from django.utils.six import StringIO from django.utils.six import StringIO
from .models import Article, Book from .models import Article, Book
...@@ -31,7 +30,6 @@ class TestNoInitialDataLoading(TransactionTestCase): ...@@ -31,7 +30,6 @@ class TestNoInitialDataLoading(TransactionTestCase):
available_apps = ['fixtures_model_package'] available_apps = ['fixtures_model_package']
@override_system_checks([])
def test_migrate(self): def test_migrate(self):
with transaction.atomic(): with transaction.atomic():
Book.objects.all().delete() Book.objects.all().delete()
...@@ -43,7 +41,6 @@ class TestNoInitialDataLoading(TransactionTestCase): ...@@ -43,7 +41,6 @@ class TestNoInitialDataLoading(TransactionTestCase):
) )
self.assertQuerysetEqual(Book.objects.all(), []) self.assertQuerysetEqual(Book.objects.all(), [])
@override_system_checks([])
def test_flush(self): def test_flush(self):
# Test presence of fixture (flush called by TransactionTestCase) # Test presence of fixture (flush called by TransactionTestCase)
self.assertQuerysetEqual( self.assertQuerysetEqual(
......
...@@ -2,7 +2,6 @@ from django.apps import apps ...@@ -2,7 +2,6 @@ from django.apps import apps
from django.core import management from django.core import management
from django.db.models import signals from django.db.models import signals
from django.test import TestCase from django.test import TestCase
from django.test.utils import override_system_checks
from django.utils import six from django.utils import six
...@@ -62,9 +61,6 @@ class MigrateSignalTests(TestCase): ...@@ -62,9 +61,6 @@ class MigrateSignalTests(TestCase):
def test_pre_migrate_call_time(self): def test_pre_migrate_call_time(self):
self.assertEqual(pre_migrate_receiver.call_counter, 1) self.assertEqual(pre_migrate_receiver.call_counter, 1)
# `auth` app is imported, but not installed in this test, so we need to
# exclude checks registered by this app.
@override_system_checks([])
def test_pre_migrate_args(self): def test_pre_migrate_args(self):
r = PreMigrateReceiver() r = PreMigrateReceiver()
signals.pre_migrate.connect(r, sender=APP_CONFIG) signals.pre_migrate.connect(r, sender=APP_CONFIG)
......
...@@ -4,7 +4,7 @@ import os ...@@ -4,7 +4,7 @@ import os
from django.core.management import call_command from django.core.management import call_command
from django.test import TestCase, TransactionTestCase from django.test import TestCase, TransactionTestCase
from django.test.utils import override_system_checks, extend_sys_path from django.test.utils import extend_sys_path
from django.utils._os import upath from django.utils._os import upath
from .models import (ConcreteModel, ConcreteModelSubclass, from .models import (ConcreteModel, ConcreteModelSubclass,
...@@ -19,9 +19,6 @@ class ProxyModelInheritanceTests(TransactionTestCase): ...@@ -19,9 +19,6 @@ class ProxyModelInheritanceTests(TransactionTestCase):
""" """
available_apps = [] available_apps = []
# `auth` app is imported, but not installed in this test, so we need to
# exclude checks registered by this app.
@override_system_checks([])
def test_table_exists(self): def test_table_exists(self):
with extend_sys_path(os.path.dirname(os.path.abspath(upath(__file__)))): with extend_sys_path(os.path.dirname(os.path.abspath(upath(__file__)))):
with self.modify_settings(INSTALLED_APPS={'append': ['app1', 'app2']}): with self.modify_settings(INSTALLED_APPS={'append': ['app1', 'app2']}):
......
...@@ -11,7 +11,6 @@ from django.core.management import call_command ...@@ -11,7 +11,6 @@ from django.core.management import call_command
from django.db.backends.dummy.base import DatabaseCreation from django.db.backends.dummy.base import DatabaseCreation
from django.test import runner, TestCase, TransactionTestCase, skipUnlessDBFeature from django.test import runner, TestCase, TransactionTestCase, skipUnlessDBFeature
from django.test.testcases import connections_support_transactions from django.test.testcases import connections_support_transactions
from django.test.utils import override_system_checks
from django.utils import six from django.utils import six
from admin_scripts.tests import AdminScriptTestCase from admin_scripts.tests import AdminScriptTestCase
...@@ -225,9 +224,6 @@ class Sqlite3InMemoryTestDbs(TestCase): ...@@ -225,9 +224,6 @@ class Sqlite3InMemoryTestDbs(TestCase):
available_apps = [] available_apps = []
# `setup_databases` triggers system check framework, but we do not want to
# perform checks.
@override_system_checks([])
@unittest.skipUnless(all(db.connections[conn].vendor == 'sqlite' for conn in db.connections), @unittest.skipUnless(all(db.connections[conn].vendor == 'sqlite' for conn in db.connections),
"This is an sqlite-specific issue") "This is an sqlite-specific issue")
def test_transaction_support(self): def test_transaction_support(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment