summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-01-12 21:38:04 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-01-12 21:39:36 +0100
commit18d75e079245d7ba789d69eacda2aaf7603d678e (patch)
tree06d5dc1237079518f00d33d860e5e4a289263d83 /tests
parentcb4a000adbb750da62daab318a9f4da8e3d4fdcd (diff)
[1.6.x] Fixed a test that was failing with PostGIS.
Fixed #21452 again.
Diffstat (limited to 'tests')
-rw-r--r--tests/backends/tests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index 90794a5472..52897e4732 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -363,11 +363,12 @@ class PostgresNewConnectionTests(TestCase):
after setting the time zone when AUTOCOMMIT is False (#21452).
"""
databases = copy.deepcopy(settings.DATABASES)
+ databases[DEFAULT_DB_ALIAS]['AUTOCOMMIT'] = False
new_connections = ConnectionHandler(databases)
new_connection = new_connections[DEFAULT_DB_ALIAS]
try:
- new_connection.settings_dict['AUTOCOMMIT'] = False
- cursor = new_connection.cursor()
+ # Open a database connection.
+ new_connection.cursor()
self.assertFalse(new_connection.get_autocommit())
finally:
new_connection.close()