summaryrefslogtreecommitdiff
path: root/tests/backends/postgresql
diff options
context:
space:
mode:
Diffstat (limited to 'tests/backends/postgresql')
-rw-r--r--tests/backends/postgresql/tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/backends/postgresql/tests.py b/tests/backends/postgresql/tests.py
index 9c4512be24..947d51ea1e 100644
--- a/tests/backends/postgresql/tests.py
+++ b/tests/backends/postgresql/tests.py
@@ -420,3 +420,13 @@ class Tests(TestCase):
with self.assertRaisesMessage(NotSupportedError, msg):
connection.check_database_version_supported()
self.assertTrue(mocked_get_database_version.called)
+
+ def test_compose_sql_when_no_connection(self):
+ new_connection = connection.copy()
+ try:
+ self.assertEqual(
+ new_connection.ops.compose_sql("SELECT %s", ["test"]),
+ "SELECT 'test'",
+ )
+ finally:
+ new_connection.close()