diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index e68c45a4a6..185f252335 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -28,7 +28,7 @@ from django.contrib.auth.models import Group, User, Permission from django.contrib.contenttypes.models import ContentType from django.forms.utils import ErrorList from django.template.response import TemplateResponse -from django.test import TestCase +from django.test import TestCase, skipUnlessDBFeature from django.test.utils import patch_logger from django.test import override_settings from django.utils import formats @@ -1525,6 +1525,7 @@ class AdminViewsNoUrlTest(TestCase): self.client.get('/test_admin/admin/logout/') +@skipUnlessDBFeature('can_defer_constraint_checks') @override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',), ROOT_URLCONF="admin_views.urls") class AdminViewDeletedObjectsTest(TestCase): diff --git a/tests/fixtures_regress/tests.py b/tests/fixtures_regress/tests.py index a9d3ae170b..c01411e158 100644 --- a/tests/fixtures_regress/tests.py +++ b/tests/fixtures_regress/tests.py @@ -411,6 +411,7 @@ class TestFixtures(TestCase): % widget.pk ) + @skipUnlessDBFeature('supports_forward_references') def test_loaddata_works_when_fixture_has_forward_refs(self): """ Regression for #3615 - Forward references cause fixtures not to load in MySQL (InnoDB) @@ -435,6 +436,7 @@ class TestFixtures(TestCase): verbosity=0, ) + @skipUnlessDBFeature('supports_forward_references') @override_settings(FIXTURE_DIRS=[os.path.join(_cur_dir, 'fixtures_1'), os.path.join(_cur_dir, 'fixtures_2')]) def test_loaddata_forward_refs_split_fixtures(self): diff --git a/tests/serializers/tests.py b/tests/serializers/tests.py index 941a231841..f6b66a054a 100644 --- a/tests/serializers/tests.py +++ b/tests/serializers/tests.py @@ -16,7 +16,7 @@ except ImportError: from django.core import management, serializers from django.db import transaction, connection -from django.test import TestCase, TransactionTestCase, override_settings +from django.test import TestCase, TransactionTestCase, override_settings, skipUnlessDBFeature from django.test.utils import Approximate from django.utils import six from django.utils.six import StringIO @@ -267,6 +267,7 @@ class SerializersTransactionTestBase(object): available_apps = ['serializers'] + @skipUnlessDBFeature('supports_forward_references') def test_forward_refs(self): """ Tests that objects ids can be referenced before they are diff --git a/tests/serializers_regress/tests.py b/tests/serializers_regress/tests.py index 22db69ba13..d111a7d719 100644 --- a/tests/serializers_regress/tests.py +++ b/tests/serializers_regress/tests.py @@ -402,6 +402,7 @@ if connection.features.allows_auto_pk_0: # registered serializers are automatically tested. +@skipUnlessDBFeature('can_defer_constraint_checks') class SerializerTests(TestCase): def test_get_unknown_serializer(self): """