1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Optimized FkConstraintsTests.test_check_constraints by specifying a database table.

This commit is contained in:
Mariusz Felisiak
2021-03-24 12:18:00 +01:00
committed by GitHub
parent 94463aa861
commit 83443e62d3

View File

@@ -622,7 +622,7 @@ class FkConstraintsTests(TransactionTestCase):
with connection.constraint_checks_disabled():
a.save()
with self.assertRaises(IntegrityError):
connection.check_constraints()
connection.check_constraints(table_names=[Article._meta.db_table])
transaction.set_rollback(True)
def test_check_constraints_sql_keywords(self):