mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
[1.6.x] Fixed a test that was failing with PostGIS.
Fixed #21452 again.
This commit is contained in:
parent
cb4a000adb
commit
18d75e0792
@ -363,11 +363,12 @@ class PostgresNewConnectionTests(TestCase):
|
|||||||
after setting the time zone when AUTOCOMMIT is False (#21452).
|
after setting the time zone when AUTOCOMMIT is False (#21452).
|
||||||
"""
|
"""
|
||||||
databases = copy.deepcopy(settings.DATABASES)
|
databases = copy.deepcopy(settings.DATABASES)
|
||||||
|
databases[DEFAULT_DB_ALIAS]['AUTOCOMMIT'] = False
|
||||||
new_connections = ConnectionHandler(databases)
|
new_connections = ConnectionHandler(databases)
|
||||||
new_connection = new_connections[DEFAULT_DB_ALIAS]
|
new_connection = new_connections[DEFAULT_DB_ALIAS]
|
||||||
try:
|
try:
|
||||||
new_connection.settings_dict['AUTOCOMMIT'] = False
|
# Open a database connection.
|
||||||
cursor = new_connection.cursor()
|
new_connection.cursor()
|
||||||
self.assertFalse(new_connection.get_autocommit())
|
self.assertFalse(new_connection.get_autocommit())
|
||||||
finally:
|
finally:
|
||||||
new_connection.close()
|
new_connection.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user