summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/backends/tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index 611aa2cb6d..bb785a22de 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -388,6 +388,8 @@ class PostgresNewConnectionTests(TestCase):
new_connection = new_connections[DEFAULT_DB_ALIAS]
try:
new_connection.settings_dict['AUTOCOMMIT'] = False
+ # Open a database connection.
+ new_connection.cursor()
self.assertFalse(new_connection.get_autocommit())
finally:
new_connection.close()