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
1 changed files with 1 additions and 1 deletions

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