summaryrefslogtreecommitdiff
path: root/tests/backends/postgresql
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2020-07-24 07:25:47 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-07-30 10:58:59 +0200
commite74b3d724e5ddfef96d1d66bd1c58e7aae26fc85 (patch)
treee478c6d04bbd8b8e1059d67e4e34e61a7666cc58 /tests/backends/postgresql
parent1173db4a16bb2938ba62a6cd50372a76a7f9e05f (diff)
Bumped minimum isort version to 5.1.0.
Fixed inner imports per isort 5. isort 5.0.0 to 5.1.0 was unstable.
Diffstat (limited to 'tests/backends/postgresql')
-rw-r--r--tests/backends/postgresql/test_creation.py1
-rw-r--r--tests/backends/postgresql/tests.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/backends/postgresql/test_creation.py b/tests/backends/postgresql/test_creation.py
index f6a067248d..20f5f7ede9 100644
--- a/tests/backends/postgresql/test_creation.py
+++ b/tests/backends/postgresql/test_creation.py
@@ -13,6 +13,7 @@ except ImportError:
pass
else:
from psycopg2 import errorcodes
+
from django.db.backends.postgresql.creation import DatabaseCreation
diff --git a/tests/backends/postgresql/tests.py b/tests/backends/postgresql/tests.py
index 1dcb14b964..8d0a801ea2 100644
--- a/tests/backends/postgresql/tests.py
+++ b/tests/backends/postgresql/tests.py
@@ -129,10 +129,10 @@ class Tests(TestCase):
ISOLATION_LEVEL_READ_COMMITTED as read_committed,
ISOLATION_LEVEL_SERIALIZABLE as serializable,
)
+
# Since this is a django.test.TestCase, a transaction is in progress
# and the isolation level isn't reported as 0. This test assumes that
# PostgreSQL is configured with the default isolation level.
-
# Check the level on the psycopg2 connection, not the Django wrapper.
default_level = read_committed if psycopg2.__version__ < '2.7' else None
self.assertEqual(connection.connection.isolation_level, default_level)