Ticket #22653: patch2.diff

File patch2.diff, 3.3 KB (added by anonymous, 10 years ago)
  • tests/admin_views/tests.py

     tests/admin_views/tests.py         | 3 ++-
     tests/fixtures_regress/tests.py    | 2 ++
     tests/serializers/tests.py         | 3 ++-
     tests/serializers_regress/tests.py | 2 +-
     4 files changed, 7 insertions(+), 3 deletions(-)
    
    diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
    index ae6c66d..28f2209 100644
    a b from django.contrib.contenttypes.models import ContentType  
    2929from django.db import connection
    3030from django.forms.utils import ErrorList
    3131from django.template.response import TemplateResponse
    32 from django.test import TestCase
     32from django.test import TestCase, skipUnlessDBFeature
    3333from django.test.utils import patch_logger
    3434from django.test import override_settings
    3535from django.utils import formats
    class AdminViewsNoUrlTest(TestCase):  
    15261526        self.client.get('/test_admin/admin/logout/')
    15271527
    15281528
     1529@skipUnlessDBFeature('can_defer_constraint_checks')
    15291530@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',),
    15301531    ROOT_URLCONF="admin_views.urls")
    15311532class AdminViewDeletedObjectsTest(TestCase):
  • tests/fixtures_regress/tests.py

    diff --git a/tests/fixtures_regress/tests.py b/tests/fixtures_regress/tests.py
    index 613cb89..a07fd30 100644
    a b class TestFixtures(TestCase):  
    411411            % widget.pk
    412412        )
    413413
     414    @skipUnlessDBFeature('supports_forward_references')
    414415    def test_loaddata_works_when_fixture_has_forward_refs(self):
    415416        """
    416417        Regression for #3615 - Forward references cause fixtures not to load in MySQL (InnoDB)
    class TestFixtures(TestCase):  
    435436                verbosity=0,
    436437            )
    437438
     439    @skipUnlessDBFeature('supports_forward_references')
    438440    @override_settings(FIXTURE_DIRS=[os.path.join(_cur_dir, 'fixtures_1'),
    439441                                     os.path.join(_cur_dir, 'fixtures_2')])
    440442    def test_loaddata_forward_refs_split_fixtures(self):
  • tests/serializers/tests.py

    diff --git a/tests/serializers/tests.py b/tests/serializers/tests.py
    index 941a231..f6b66a0 100644
    a b except ImportError:  
    1616
    1717from django.core import management, serializers
    1818from django.db import transaction, connection
    19 from django.test import TestCase, TransactionTestCase, override_settings
     19from django.test import TestCase, TransactionTestCase, override_settings, skipUnlessDBFeature
    2020from django.test.utils import Approximate
    2121from django.utils import six
    2222from django.utils.six import StringIO
    class SerializersTransactionTestBase(object):  
    267267
    268268    available_apps = ['serializers']
    269269
     270    @skipUnlessDBFeature('supports_forward_references')
    270271    def test_forward_refs(self):
    271272        """
    272273        Tests that objects ids can be referenced before they are
  • tests/serializers_regress/tests.py

    diff --git a/tests/serializers_regress/tests.py b/tests/serializers_regress/tests.py
    index 22db69b..cc046b5 100644
    a b if connection.features.allows_auto_pk_0:  
    401401# Dynamically create serializer tests to ensure that all
    402402# registered serializers are automatically tested.
    403403
    404 
     404@skipUnlessDBFeature('can_defer_constraint_checks')
    405405class SerializerTests(TestCase):
    406406    def test_get_unknown_serializer(self):
    407407        """
Back to Top