Enabled autocommit for PostgreSQL.

For users who didn't activate autocommit in their database options, this
is backwards-incompatible in "non-managed" aka "auto" transaction state.
This state now uses database-level autocommit instead of ORM-level
autocommit.

Also removed the uses_autocommit feature which lost its purpose.
This commit is contained in:
Aymeric Augustin 2013-03-02 21:59:55 +01:00
parent 8717b0668c
commit af9e9386eb
5 changed files with 19 additions and 20 deletions

View file

@ -302,8 +302,8 @@ class PostgresNewConnectionTest(TestCase):
transaction is rolled back.
"""
@unittest.skipUnless(
connection.vendor == 'postgresql' and connection.isolation_level > 0,
"This test applies only to PostgreSQL without autocommit")
connection.vendor == 'postgresql',
"This test applies only to PostgreSQL")
def test_connect_and_rollback(self):
new_connections = ConnectionHandler(settings.DATABASES)
new_connection = new_connections[DEFAULT_DB_ALIAS]