1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Used skipUnlessDBFeature where appropriate.

This commit is contained in:
Simon Charette
2015-08-08 11:27:06 -04:00
parent 787cc7aa84
commit 12f91f6ebd
3 changed files with 20 additions and 19 deletions

View File

@@ -8,7 +8,7 @@ from django.db.migrations.state import ProjectState
from django.db.models.fields import NOT_PROVIDED
from django.db.transaction import atomic
from django.db.utils import IntegrityError
from django.test import override_settings
from django.test import override_settings, skipUnlessDBFeature
from django.utils import six
from .models import FoodManager, FoodQuerySet
@@ -1114,7 +1114,7 @@ class OperationTests(OperationTestBase):
with connection.schema_editor() as editor:
operation.database_backwards("test_alflpk", editor, new_state, project_state)
@unittest.skipUnless(connection.features.supports_foreign_keys, "No FK support")
@skipUnlessDBFeature('supports_foreign_keys')
def test_alter_field_pk_fk(self):
"""
Tests the AlterField operation on primary keys changes any FKs pointing to it.