Skip to content

Commit

Permalink
Used DatabaseFeatures.django_test_skips to skip AssertNumQueriesUponC…
Browse files Browse the repository at this point in the history
…onnectionTests tests.
  • Loading branch information
baldychristophe authored Nov 24, 2022
1 parent 17472c3 commit 70c945d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions django/db/backends/sqlite3/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ def django_test_skips(self):
"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:
Expand Down
4 changes: 0 additions & 4 deletions tests/test_utils/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,6 @@ def test_func():
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 = []

Expand Down

0 comments on commit 70c945d

Please sign in to comment.