diff options
| author | Claude Paroz <claude@2xlibre.net> | 2014-09-18 18:11:37 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-09-18 20:00:35 +0200 |
| commit | abc11b0a33fd823ad341ab2cc113c73545eb61e6 (patch) | |
| tree | 6ecc82723a5044ca4e748e11053fa46e7e9e1e5c /tests | |
| parent | 4dcfacb5b92dc06c4a351119cf501d842d46d192 (diff) | |
Fixed #23514 -- Prevented queries in PostGISOperations init
Thanks Mattia Procopio for the report.
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)) |
