summaryrefslogtreecommitdiff
path: root/tests/test_utils/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_utils/tests.py')
-rw-r--r--tests/test_utils/tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py
index 7e9505f762..fab7f27aa1 100644
--- a/tests/test_utils/tests.py
+++ b/tests/test_utils/tests.py
@@ -2161,6 +2161,16 @@ class AllowedDatabaseQueriesTests(SimpleTestCase):
conn.close()
conn.dec_thread_sharing()
+ def test_allowed_database_copy_queries(self):
+ new_connection = connection.copy("dynamic_connection")
+ try:
+ with new_connection.cursor() as cursor:
+ sql = f"SELECT 1{new_connection.features.bare_select_suffix}"
+ cursor.execute(sql)
+ self.assertEqual(cursor.fetchone()[0], 1)
+ finally:
+ new_connection.close()
+
class DatabaseAliasTests(SimpleTestCase):
def setUp(self):