Used DatabaseFeatures.django_test_skips to skip AssertNumQueriesUponConnectionTests tests.

This commit is contained in:
Christophe Baldy 2022-11-24 19:41:08 +01:00 committed by GitHub
parent 17472c3304
commit 70c945d6b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -109,6 +109,11 @@ class DatabaseFeatures(BaseDatabaseFeatures):
"servers.tests.LiveServerTestCloseConnectionTest."
"test_closes_connections",
},
"For SQLite in-memory tests, closing the connection destroys"
"the database.": {
"test_utils.tests.AssertNumQueriesUponConnectionTests."
"test_ignores_connection_configuration_queries",
},
}
)
else:

View File

@ -235,10 +235,6 @@ class AssertNumQueriesTests(TestCase):
self.assertNumQueries(2, test_func)
@unittest.skipUnless(
connection.vendor != "sqlite" or not connection.is_in_memory_db(),
"For SQLite in-memory tests, closing the connection destroys the database.",
)
class AssertNumQueriesUponConnectionTests(TransactionTestCase):
available_apps = []