summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/backends/test_creation.py10
-rw-r--r--tests/base/models.py1
-rw-r--r--tests/foreign_object/tests.py1
-rw-r--r--tests/i18n/test_compilation.py5
-rw-r--r--tests/i18n/test_extraction.py5
-rw-r--r--tests/model_inheritance/models.py1
-rw-r--r--tests/model_options/models/tablespaces.py1
-rw-r--r--tests/prefetch_related/models.py2
-rw-r--r--tests/proxy_models/models.py1
-rw-r--r--tests/select_related/models.py1
-rw-r--r--tests/serializers/test_data.py1
-rw-r--r--tests/sessions_tests/tests.py10
-rw-r--r--tests/staticfiles_tests/test_storage.py5
-rw-r--r--tests/unmanaged_models/models.py1
14 files changed, 21 insertions, 24 deletions
diff --git a/tests/backends/test_creation.py b/tests/backends/test_creation.py
index 90ea59086e..4b5d01ea2d 100644
--- a/tests/backends/test_creation.py
+++ b/tests/backends/test_creation.py
@@ -8,10 +8,12 @@ from django.db import DEFAULT_DB_ALIAS, connection, connections
from django.db.backends.base.creation import (
TEST_DATABASE_PREFIX, BaseDatabaseCreation,
)
-from django.db.backends.mysql.creation import \
- DatabaseCreation as MySQLDatabaseCreation
-from django.db.backends.oracle.creation import \
- DatabaseCreation as OracleDatabaseCreation
+from django.db.backends.mysql.creation import (
+ DatabaseCreation as MySQLDatabaseCreation,
+)
+from django.db.backends.oracle.creation import (
+ DatabaseCreation as OracleDatabaseCreation,
+)
from django.db.utils import DatabaseError
from django.test import SimpleTestCase, TestCase
diff --git a/tests/base/models.py b/tests/base/models.py
index b179878704..70088bd96e 100644
--- a/tests/base/models.py
+++ b/tests/base/models.py
@@ -1,6 +1,5 @@
from django.db import models
-
# The models definitions below used to crash. Generating models dynamically
# at runtime is a bad idea because it pollutes the app registry. This doesn't
# integrate well with the test suite but at least it prevents regressions.
diff --git a/tests/foreign_object/tests.py b/tests/foreign_object/tests.py
index 3c1f5bdfb4..e74732ab72 100644
--- a/tests/foreign_object/tests.py
+++ b/tests/foreign_object/tests.py
@@ -13,7 +13,6 @@ from .models import (
Group, Membership, NewsArticle, Person,
)
-
# Note that these tests are testing internal implementation details.
# ForeignObject is not part of public API.
diff --git a/tests/i18n/test_compilation.py b/tests/i18n/test_compilation.py
index 258ab53042..02114fa2dd 100644
--- a/tests/i18n/test_compilation.py
+++ b/tests/i18n/test_compilation.py
@@ -9,8 +9,9 @@ from unittest import mock
from django.core.management import (
CommandError, call_command, execute_from_command_line,
)
-from django.core.management.commands.makemessages import \
- Command as MakeMessagesCommand
+from django.core.management.commands.makemessages import (
+ Command as MakeMessagesCommand,
+)
from django.core.management.utils import find_command
from django.test import SimpleTestCase, override_settings
from django.test.utils import captured_stderr, captured_stdout
diff --git a/tests/i18n/test_extraction.py b/tests/i18n/test_extraction.py
index fc1c68a090..731c29a978 100644
--- a/tests/i18n/test_extraction.py
+++ b/tests/i18n/test_extraction.py
@@ -11,8 +11,9 @@ from admin_scripts.tests import AdminScriptTestCase
from django.core import management
from django.core.management import execute_from_command_line
from django.core.management.base import CommandError
-from django.core.management.commands.makemessages import \
- Command as MakeMessagesCommand
+from django.core.management.commands.makemessages import (
+ Command as MakeMessagesCommand,
+)
from django.core.management.utils import find_command
from django.test import SimpleTestCase, override_settings
from django.test.utils import captured_stderr, captured_stdout
diff --git a/tests/model_inheritance/models.py b/tests/model_inheritance/models.py
index 86b1cddb8c..a542385d60 100644
--- a/tests/model_inheritance/models.py
+++ b/tests/model_inheritance/models.py
@@ -13,7 +13,6 @@ Both styles are demonstrated here.
"""
from django.db import models
-
#
# Abstract base classes
#
diff --git a/tests/model_options/models/tablespaces.py b/tests/model_options/models/tablespaces.py
index ec705b7b2d..0ee0e20ef4 100644
--- a/tests/model_options/models/tablespaces.py
+++ b/tests/model_options/models/tablespaces.py
@@ -1,6 +1,5 @@
from django.db import models
-
# Since the test database doesn't have tablespaces, it's impossible for Django
# to create the tables for models where db_tablespace is set. To avoid this
# problem, we mark the models as unmanaged, and temporarily revert them to
diff --git a/tests/prefetch_related/models.py b/tests/prefetch_related/models.py
index 8b6b82a31a..08e62c26e0 100644
--- a/tests/prefetch_related/models.py
+++ b/tests/prefetch_related/models.py
@@ -9,8 +9,6 @@ from django.db.models.query import ModelIterable, QuerySet
from django.utils.functional import cached_property
-# Basic tests
-
class Author(models.Model):
name = models.CharField(max_length=50, unique=True)
first_book = models.ForeignKey('Book', models.CASCADE, related_name='first_time_authors')
diff --git a/tests/proxy_models/models.py b/tests/proxy_models/models.py
index 2e4679122d..d0603886e0 100644
--- a/tests/proxy_models/models.py
+++ b/tests/proxy_models/models.py
@@ -6,7 +6,6 @@ providing a modified interface to the data from the base class.
"""
from django.db import models
-
# A couple of managers for testing managing overriding in proxy model cases.
diff --git a/tests/select_related/models.py b/tests/select_related/models.py
index c8ecf831ba..b3f113efa8 100644
--- a/tests/select_related/models.py
+++ b/tests/select_related/models.py
@@ -13,7 +13,6 @@ from django.contrib.contenttypes.fields import (
from django.contrib.contenttypes.models import ContentType
from django.db import models
-
# Who remembers high school biology?
diff --git a/tests/serializers/test_data.py b/tests/serializers/test_data.py
index 966df682b2..c56223a1e8 100644
--- a/tests/serializers/test_data.py
+++ b/tests/serializers/test_data.py
@@ -29,7 +29,6 @@ from .models import (
)
from .tests import register_tests
-
# A set of functions that can be used to recreate
# test data objects of various kinds.
# The save method is a raw base model save, to make
diff --git a/tests/sessions_tests/tests.py b/tests/sessions_tests/tests.py
index 4cbb6c1d51..bd0e3b7668 100644
--- a/tests/sessions_tests/tests.py
+++ b/tests/sessions_tests/tests.py
@@ -11,12 +11,14 @@ from http import cookies
from django.conf import settings
from django.contrib.sessions.backends.base import UpdateError
from django.contrib.sessions.backends.cache import SessionStore as CacheSession
-from django.contrib.sessions.backends.cached_db import \
- SessionStore as CacheDBSession
+from django.contrib.sessions.backends.cached_db import (
+ SessionStore as CacheDBSession,
+)
from django.contrib.sessions.backends.db import SessionStore as DatabaseSession
from django.contrib.sessions.backends.file import SessionStore as FileSession
-from django.contrib.sessions.backends.signed_cookies import \
- SessionStore as CookieSession
+from django.contrib.sessions.backends.signed_cookies import (
+ SessionStore as CookieSession,
+)
from django.contrib.sessions.exceptions import InvalidSessionKey
from django.contrib.sessions.middleware import SessionMiddleware
from django.contrib.sessions.models import Session
diff --git a/tests/staticfiles_tests/test_storage.py b/tests/staticfiles_tests/test_storage.py
index f5372b22b8..12d4c85c01 100644
--- a/tests/staticfiles_tests/test_storage.py
+++ b/tests/staticfiles_tests/test_storage.py
@@ -7,8 +7,9 @@ from io import StringIO
from django.conf import settings
from django.contrib.staticfiles import finders, storage
-from django.contrib.staticfiles.management.commands.collectstatic import \
- Command as CollectstaticCommand
+from django.contrib.staticfiles.management.commands.collectstatic import (
+ Command as CollectstaticCommand,
+)
from django.core.cache.backends.base import BaseCache
from django.core.management import call_command
from django.test import override_settings
diff --git a/tests/unmanaged_models/models.py b/tests/unmanaged_models/models.py
index 13824b7732..c8da49aa07 100644
--- a/tests/unmanaged_models/models.py
+++ b/tests/unmanaged_models/models.py
@@ -5,7 +5,6 @@ is generated for the table on various manage.py operations.
from django.db import models
-
# All of these models are created in the database by Django.