summaryrefslogtreecommitdiff
path: root/tests/backends/postgresql
diff options
context:
space:
mode:
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)