1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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):