Fixed a test that was failing with PostGIS.

Fixed #21452 again.

Forward-port of 18d75e07 from stable/1.6.x.
This commit is contained in:
Aymeric Augustin 2014-01-12 21:40:22 +01:00
parent 720c6d3a44
commit 225a6ed2cf
1 changed files with 1 additions and 1 deletions

View File

@ -384,10 +384,10 @@ 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. # Open a database connection.
new_connection.cursor() new_connection.cursor()
self.assertFalse(new_connection.get_autocommit()) self.assertFalse(new_connection.get_autocommit())