1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

All tests passing on MySQL

This commit is contained in:
Andrew Godwin
2012-08-18 13:48:54 +01:00
parent cab044c66c
commit f7955c703d
4 changed files with 53 additions and 30 deletions

View File

@@ -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