diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/backends/tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py index 89132f2a31..2ab8f680b5 100644 --- a/tests/backends/tests.py +++ b/tests/backends/tests.py @@ -571,6 +571,14 @@ class BackendTestCase(TestCase): self.assertTrue(hasattr(connection.ops, 'connection')) self.assertEqual(connection, connection.ops.connection) + def test_database_operations_init(self): + """ + Test that DatabaseOperations initialization doesn't query the database. + See #17656. + """ + with self.assertNumQueries(0): + connection.ops.__class__(connection) + def test_cached_db_features(self): self.assertIn(connection.features.supports_transactions, (True, False)) self.assertIn(connection.features.supports_stddev, (True, False)) |
