diff options
author | Nick Pope <nick.pope@flightdataservices.com> | 2019-08-20 08:54:41 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-02-04 13:20:06 +0100 |
commit | 335c9c94acf263901fb023404408880245b0c4b4 (patch) | |
tree | 691e9683de6c9840cd0a9a097d020c499ea735db /tests/backends | |
parent | 469bf2db15597f2c87cb0f8f64132056d2467f15 (diff) | |
download | django-335c9c94acf263901fb023404408880245b0c4b4.tar.gz |
Simplified imports from django.db and django.contrib.gis.db.
Diffstat (limited to 'tests/backends')
-rw-r--r-- | tests/backends/mysql/test_creation.py | 3 | ||||
-rw-r--r-- | tests/backends/oracle/test_creation.py | 3 | ||||
-rw-r--r-- | tests/backends/oracle/tests.py | 5 | ||||
-rw-r--r-- | tests/backends/postgresql/test_creation.py | 3 | ||||
-rw-r--r-- | tests/backends/sqlite/tests.py | 8 | ||||
-rw-r--r-- | tests/backends/test_utils.py | 3 |
6 files changed, 9 insertions, 16 deletions
diff --git a/tests/backends/mysql/test_creation.py b/tests/backends/mysql/test_creation.py index 01e59d8758..5675601a1b 100644 --- a/tests/backends/mysql/test_creation.py +++ b/tests/backends/mysql/test_creation.py @@ -3,10 +3,9 @@ import unittest from io import StringIO from unittest import mock -from django.db import connection +from django.db import DatabaseError, connection from django.db.backends.base.creation import BaseDatabaseCreation from django.db.backends.mysql.creation import DatabaseCreation -from django.db.utils import DatabaseError from django.test import SimpleTestCase diff --git a/tests/backends/oracle/test_creation.py b/tests/backends/oracle/test_creation.py index f090a0ac89..930d2520e2 100644 --- a/tests/backends/oracle/test_creation.py +++ b/tests/backends/oracle/test_creation.py @@ -2,9 +2,8 @@ import unittest from io import StringIO from unittest import mock -from django.db import connection +from django.db import DatabaseError, connection from django.db.backends.oracle.creation import DatabaseCreation -from django.db.utils import DatabaseError from django.test import TestCase diff --git a/tests/backends/oracle/tests.py b/tests/backends/oracle/tests.py index a0d49854d9..0a7bf01963 100644 --- a/tests/backends/oracle/tests.py +++ b/tests/backends/oracle/tests.py @@ -1,8 +1,7 @@ import unittest -from django.db import connection -from django.db.models.fields import BooleanField, NullBooleanField -from django.db.utils import DatabaseError +from django.db import DatabaseError, connection +from django.db.models import BooleanField, NullBooleanField from django.test import TransactionTestCase from ..models import Square diff --git a/tests/backends/postgresql/test_creation.py b/tests/backends/postgresql/test_creation.py index 7d6f319a80..f6a067248d 100644 --- a/tests/backends/postgresql/test_creation.py +++ b/tests/backends/postgresql/test_creation.py @@ -3,9 +3,8 @@ from contextlib import contextmanager from io import StringIO from unittest import mock -from django.db import connection +from django.db import DatabaseError, connection from django.db.backends.base.creation import BaseDatabaseCreation -from django.db.utils import DatabaseError from django.test import SimpleTestCase try: diff --git a/tests/backends/sqlite/tests.py b/tests/backends/sqlite/tests.py index 3447fb6096..fc02671ca5 100644 --- a/tests/backends/sqlite/tests.py +++ b/tests/backends/sqlite/tests.py @@ -8,11 +8,9 @@ from sqlite3 import dbapi2 from unittest import mock from django.core.exceptions import ImproperlyConfigured -from django.db import ConnectionHandler, connection, transaction -from django.db.models import Avg, StdDev, Sum, Variance -from django.db.models.aggregates import Aggregate -from django.db.models.fields import CharField -from django.db.utils import NotSupportedError +from django.db import NotSupportedError, connection, transaction +from django.db.models import Aggregate, Avg, CharField, StdDev, Sum, Variance +from django.db.utils import ConnectionHandler from django.test import ( TestCase, TransactionTestCase, override_settings, skipIfDBFeature, ) diff --git a/tests/backends/test_utils.py b/tests/backends/test_utils.py index cd4911fd1a..7974dee607 100644 --- a/tests/backends/test_utils.py +++ b/tests/backends/test_utils.py @@ -1,11 +1,10 @@ """Tests for django.db.backends.utils""" from decimal import Decimal, Rounded -from django.db import connection +from django.db import NotSupportedError, connection from django.db.backends.utils import ( format_number, split_identifier, truncate_name, ) -from django.db.utils import NotSupportedError from django.test import ( SimpleTestCase, TransactionTestCase, skipIfDBFeature, skipUnlessDBFeature, ) |