Loading tests/backends/tests.py +3 −2 Original line number Diff line number Diff line Loading @@ -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() Loading Loading
tests/backends/tests.py +3 −2 Original line number Diff line number Diff line Loading @@ -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() Loading