mirror of
https://github.com/django/django.git
synced 2025-08-31 15:57:45 +00:00
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:
parent
8717b0668c
commit
af9e9386eb
5 changed files with 19 additions and 20 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue