mirror of
https://github.com/django/django.git
synced 2025-08-30 23:37:50 +00:00
Fixed various tests on MySQL with MyISAM storage engine.
This commit is contained in:
parent
331a460f8f
commit
8e89dfe1c2
8 changed files with 54 additions and 34 deletions
|
@ -694,8 +694,12 @@ class FkConstraintsTests(TransactionTestCase):
|
|||
a.reporter_id = 30
|
||||
with connection.constraint_checks_disabled():
|
||||
a.save()
|
||||
with self.assertRaises(IntegrityError):
|
||||
try:
|
||||
connection.check_constraints(table_names=[Article._meta.db_table])
|
||||
except IntegrityError:
|
||||
pass
|
||||
else:
|
||||
self.skipTest("This backend does not support integrity checks.")
|
||||
transaction.set_rollback(True)
|
||||
|
||||
def test_check_constraints_sql_keywords(self):
|
||||
|
@ -705,8 +709,12 @@ class FkConstraintsTests(TransactionTestCase):
|
|||
obj.reporter_id = 30
|
||||
with connection.constraint_checks_disabled():
|
||||
obj.save()
|
||||
with self.assertRaises(IntegrityError):
|
||||
try:
|
||||
connection.check_constraints(table_names=["order"])
|
||||
except IntegrityError:
|
||||
pass
|
||||
else:
|
||||
self.skipTest("This backend does not support integrity checks.")
|
||||
transaction.set_rollback(True)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue