diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/schema/tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/modeltests/schema/tests.py b/tests/modeltests/schema/tests.py index 7b1de268a4..7031138280 100644 --- a/tests/modeltests/schema/tests.py +++ b/tests/modeltests/schema/tests.py @@ -39,6 +39,7 @@ class SchemaTests(TestCase): connection.rollback() # Delete any tables made for our models cursor = connection.cursor() + connection.disable_constraint_checking() for model in self.models: # Remove any M2M tables first for field in model._meta.local_many_to_many: @@ -59,6 +60,7 @@ class SchemaTests(TestCase): connection.rollback() else: connection.commit() + connection.enable_constraint_checking() # Unhook our models for model in self.models: model._meta.managed = False |
