summaryrefslogtreecommitdiff
path: root/tests/backends
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-04-14 12:54:27 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-04-18 07:05:52 +0200
commit8e89dfe1c24540d33b577377af633694ff57f505 (patch)
tree127b5b495d97a89e88e943470b8a57a2f8ce907f /tests/backends
parent331a460f8f2e4f447b68fba491464b68c9b21fd1 (diff)
Fixed various tests on MySQL with MyISAM storage engine.
Diffstat (limited to 'tests/backends')
-rw-r--r--tests/backends/tests.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index 85b0e55cb0..9303089b51 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -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)