diff --git a/django/contrib/auth/tests/test_auth_backends.py b/django/contrib/auth/tests/test_auth_backends.py index 757ad290a75..4331b8496c6 100644 --- a/django/contrib/auth/tests/test_auth_backends.py +++ b/django/contrib/auth/tests/test_auth_backends.py @@ -10,8 +10,7 @@ from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.contrib.auth import authenticate, get_user from django.http import HttpRequest -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.contrib.auth.hashers import MD5PasswordHasher diff --git a/django/contrib/auth/tests/test_basic.py b/django/contrib/auth/tests/test_basic.py index 34b61426325..ec33aece251 100644 --- a/django/contrib/auth/tests/test_basic.py +++ b/django/contrib/auth/tests/test_basic.py @@ -11,9 +11,8 @@ from django.contrib.auth.tests.utils import skipIfCustomUser from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command from django.dispatch import receiver -from django.test import TestCase +from django.test import TestCase, override_settings from django.test.signals import setting_changed -from django.test.utils import override_settings from django.utils import translation from django.utils.encoding import force_str from django.utils.six import binary_type, PY2, StringIO diff --git a/django/contrib/auth/tests/test_context_processors.py b/django/contrib/auth/tests/test_context_processors.py index bf30790a8a4..48c5b77f202 100644 --- a/django/contrib/auth/tests/test_context_processors.py +++ b/django/contrib/auth/tests/test_context_processors.py @@ -7,8 +7,7 @@ from django.contrib.auth.models import User, Permission from django.contrib.contenttypes.models import ContentType from django.contrib.auth.context_processors import PermWrapper, PermLookupDict from django.db.models import Q -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils._os import upath diff --git a/django/contrib/auth/tests/test_forms.py b/django/contrib/auth/tests/test_forms.py index 41cb3350b11..837db709a57 100644 --- a/django/contrib/auth/tests/test_forms.py +++ b/django/contrib/auth/tests/test_forms.py @@ -12,8 +12,7 @@ from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm, from django.contrib.auth.tests.utils import skipIfCustomUser from django.core import mail from django.forms.fields import Field, CharField -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils.encoding import force_text from django.utils._os import upath from django.utils import translation diff --git a/django/contrib/auth/tests/test_handlers.py b/django/contrib/auth/tests/test_handlers.py index b86775fc289..f041bd54e10 100644 --- a/django/contrib/auth/tests/test_handlers.py +++ b/django/contrib/auth/tests/test_handlers.py @@ -5,7 +5,7 @@ from django.contrib.auth.models import User, Group from django.contrib.auth.tests.custom_user import CustomUser from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TransactionTestCase -from django.test.utils import override_settings +from django.test import override_settings # This must be a TransactionTestCase because the WSGI auth handler performs diff --git a/django/contrib/auth/tests/test_management.py b/django/contrib/auth/tests/test_management.py index c005e74442e..57c986ac8a3 100644 --- a/django/contrib/auth/tests/test_management.py +++ b/django/contrib/auth/tests/test_management.py @@ -13,8 +13,7 @@ from django.core import exceptions from django.core.management import call_command from django.core.management.base import CommandError from django.core.management.validation import get_validation_errors -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils import six from django.utils.six import StringIO diff --git a/django/contrib/auth/tests/test_models.py b/django/contrib/auth/tests/test_models.py index a858bb2566a..9e2c6537384 100644 --- a/django/contrib/auth/tests/test_models.py +++ b/django/contrib/auth/tests/test_models.py @@ -3,8 +3,7 @@ from django.contrib.auth.models import AbstractUser, Group, User, UserManager from django.contrib.auth.tests.utils import skipIfCustomUser from django.core import mail from django.db.models.signals import post_save -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings @skipIfCustomUser diff --git a/django/contrib/auth/tests/test_signals.py b/django/contrib/auth/tests/test_signals.py index 024f44f547d..81266807c9f 100644 --- a/django/contrib/auth/tests/test_signals.py +++ b/django/contrib/auth/tests/test_signals.py @@ -3,7 +3,7 @@ from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TestCase from django.test.client import RequestFactory -from django.test.utils import override_settings +from django.test import override_settings @skipIfCustomUser diff --git a/django/contrib/auth/tests/test_templates.py b/django/contrib/auth/tests/test_templates.py index f7d74748a25..1d1a8b49a8a 100644 --- a/django/contrib/auth/tests/test_templates.py +++ b/django/contrib/auth/tests/test_templates.py @@ -7,7 +7,7 @@ from django.contrib.auth.views import ( password_reset_complete, password_change, password_change_done, ) from django.test import RequestFactory, TestCase -from django.test.utils import override_settings +from django.test import override_settings from django.utils.encoding import force_bytes, force_text from django.utils.http import urlsafe_base64_encode diff --git a/django/contrib/auth/tests/test_views.py b/django/contrib/auth/tests/test_views.py index 4a1783b14d9..6d841c287e5 100644 --- a/django/contrib/auth/tests/test_views.py +++ b/django/contrib/auth/tests/test_views.py @@ -14,8 +14,8 @@ from django.utils.encoding import force_text from django.utils.http import urlquote from django.utils.six.moves.urllib.parse import urlparse, ParseResult from django.utils._os import upath -from django.test import TestCase -from django.test.utils import override_settings, patch_logger +from django.test import TestCase, override_settings +from django.test.utils import patch_logger from django.middleware.csrf import CsrfViewMiddleware from django.contrib.sessions.middleware import SessionMiddleware diff --git a/django/contrib/contenttypes/tests.py b/django/contrib/contenttypes/tests.py index ceac7ccd1b9..2943a830951 100644 --- a/django/contrib/contenttypes/tests.py +++ b/django/contrib/contenttypes/tests.py @@ -5,8 +5,7 @@ from django.contrib.contenttypes.views import shortcut from django.contrib.sites.models import get_current_site from django.db import models from django.http import HttpRequest, Http404 -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils.http import urlquote from django.utils import six from django.utils.encoding import python_2_unicode_compatible diff --git a/django/contrib/flatpages/tests/test_csrf.py b/django/contrib/flatpages/tests/test_csrf.py index 4506433195c..23c03a1e130 100644 --- a/django/contrib/flatpages/tests/test_csrf.py +++ b/django/contrib/flatpages/tests/test_csrf.py @@ -2,7 +2,7 @@ import os from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TestCase, Client -from django.test.utils import override_settings +from django.test import override_settings @override_settings( diff --git a/django/contrib/flatpages/tests/test_forms.py b/django/contrib/flatpages/tests/test_forms.py index a216b37c671..8a6db742fa8 100644 --- a/django/contrib/flatpages/tests/test_forms.py +++ b/django/contrib/flatpages/tests/test_forms.py @@ -3,8 +3,7 @@ from __future__ import unicode_literals from django.conf import settings from django.contrib.flatpages.forms import FlatpageForm from django.contrib.flatpages.models import FlatPage -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils import translation diff --git a/django/contrib/flatpages/tests/test_middleware.py b/django/contrib/flatpages/tests/test_middleware.py index dd1a0192cea..47d29bdb00b 100644 --- a/django/contrib/flatpages/tests/test_middleware.py +++ b/django/contrib/flatpages/tests/test_middleware.py @@ -3,8 +3,7 @@ from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.flatpages.models import FlatPage -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings @override_settings( diff --git a/django/contrib/flatpages/tests/test_templatetags.py b/django/contrib/flatpages/tests/test_templatetags.py index 39ae734c8cb..025c73c2cfa 100644 --- a/django/contrib/flatpages/tests/test_templatetags.py +++ b/django/contrib/flatpages/tests/test_templatetags.py @@ -2,8 +2,7 @@ import os from django.contrib.auth.models import AnonymousUser, User from django.contrib.auth.tests.utils import skipIfCustomUser from django.template import Template, Context, TemplateSyntaxError -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings @override_settings( diff --git a/django/contrib/flatpages/tests/test_views.py b/django/contrib/flatpages/tests/test_views.py index 056641e301d..d2683fbbf4c 100644 --- a/django/contrib/flatpages/tests/test_views.py +++ b/django/contrib/flatpages/tests/test_views.py @@ -3,8 +3,7 @@ from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.flatpages.models import FlatPage -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings @override_settings( diff --git a/django/contrib/formtools/tests/tests.py b/django/contrib/formtools/tests/tests.py index 84b0c7e2d0f..59939a1ecd3 100644 --- a/django/contrib/formtools/tests/tests.py +++ b/django/contrib/formtools/tests/tests.py @@ -8,8 +8,7 @@ import warnings from django import http from django.contrib.formtools import preview, utils -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils._os import upath from django.contrib.formtools.tests.forms import ( diff --git a/django/contrib/gis/tests/geoadmin/tests.py b/django/contrib/gis/tests/geoadmin/tests.py index b39b3183dc3..06a8ed245a1 100644 --- a/django/contrib/gis/tests/geoadmin/tests.py +++ b/django/contrib/gis/tests/geoadmin/tests.py @@ -4,8 +4,7 @@ from unittest import skipUnless from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.tests.utils import HAS_SPATIAL_DB -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings if HAS_GEOS and HAS_SPATIAL_DB: from django.contrib.gis import admin diff --git a/django/contrib/humanize/tests.py b/django/contrib/humanize/tests.py index 0f31beb81fa..ab4d53c7603 100644 --- a/django/contrib/humanize/tests.py +++ b/django/contrib/humanize/tests.py @@ -11,8 +11,8 @@ except ImportError: from django.conf import settings from django.contrib.humanize.templatetags import humanize from django.template import Template, Context, defaultfilters -from django.test import TestCase -from django.test.utils import override_settings, TransRealMixin +from django.test import TestCase, override_settings +from django.test.utils import TransRealMixin from django.utils.html import escape from django.utils.timezone import utc, get_fixed_timezone from django.utils import translation diff --git a/django/contrib/messages/tests/base.py b/django/contrib/messages/tests/base.py index e38749c13ec..54592e8d25f 100644 --- a/django/contrib/messages/tests/base.py +++ b/django/contrib/messages/tests/base.py @@ -9,7 +9,7 @@ from django.contrib.messages.constants import DEFAULT_LEVELS from django.contrib.messages.storage import default_storage, base from django.contrib.messages.storage.base import Message from django.core.urlresolvers import reverse -from django.test.utils import modify_settings, override_settings +from django.test import modify_settings, override_settings from django.utils.translation import ugettext_lazy diff --git a/django/contrib/messages/tests/test_cookie.py b/django/contrib/messages/tests/test_cookie.py index 028f01382ba..d44dd944916 100644 --- a/django/contrib/messages/tests/test_cookie.py +++ b/django/contrib/messages/tests/test_cookie.py @@ -5,8 +5,7 @@ from django.contrib.messages.tests.base import BaseTests from django.contrib.messages.storage.cookie import (CookieStorage, MessageEncoder, MessageDecoder) from django.contrib.messages.storage.base import Message -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils.safestring import SafeData, mark_safe diff --git a/django/contrib/redirects/tests.py b/django/contrib/redirects/tests.py index 99c5c3fd383..3bed0e02e52 100644 --- a/django/contrib/redirects/tests.py +++ b/django/contrib/redirects/tests.py @@ -2,8 +2,7 @@ from django import http from django.conf import settings from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured -from django.test import TestCase -from django.test.utils import modify_settings, override_settings +from django.test import TestCase, modify_settings, override_settings from django.utils import six from .middleware import RedirectFallbackMiddleware diff --git a/django/contrib/sessions/tests.py b/django/contrib/sessions/tests.py index 51a65a1fef2..34b89641539 100644 --- a/django/contrib/sessions/tests.py +++ b/django/contrib/sessions/tests.py @@ -20,8 +20,8 @@ from django.core.cache.backends.base import InvalidCacheBackendError from django.core import management from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponse -from django.test import TestCase, RequestFactory -from django.test.utils import override_settings, patch_logger +from django.test import TestCase, RequestFactory, override_settings +from django.test.utils import patch_logger from django.utils import six from django.utils import timezone diff --git a/django/contrib/sitemaps/tests/test_generic.py b/django/contrib/sitemaps/tests/test_generic.py index 5b265736b31..870e29886db 100644 --- a/django/contrib/sitemaps/tests/test_generic.py +++ b/django/contrib/sitemaps/tests/test_generic.py @@ -1,6 +1,6 @@ from __future__ import unicode_literals -from django.test.utils import override_settings +from django.test import override_settings from .base import TestModel, SitemapTestsBase diff --git a/django/contrib/sitemaps/tests/test_https.py b/django/contrib/sitemaps/tests/test_https.py index 9594d0f7a4c..58ff68931e6 100644 --- a/django/contrib/sitemaps/tests/test_https.py +++ b/django/contrib/sitemaps/tests/test_https.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals from datetime import date -from django.test.utils import override_settings +from django.test import override_settings from .base import SitemapTestsBase diff --git a/django/contrib/sites/tests.py b/django/contrib/sites/tests.py index fee1189c97a..efa4fefa44c 100644 --- a/django/contrib/sites/tests.py +++ b/django/contrib/sites/tests.py @@ -4,8 +4,7 @@ from django.conf import settings from django.contrib.sites.models import Site, RequestSite, get_current_site from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.http import HttpRequest -from django.test import TestCase -from django.test.utils import modify_settings, override_settings +from django.test import TestCase, modify_settings, override_settings @modify_settings(INSTALLED_APPS={'append': 'django.contrib.sites'}) diff --git a/tests/admin_custom_urls/tests.py b/tests/admin_custom_urls/tests.py index f7a469efe9c..d629c78e04f 100644 --- a/tests/admin_custom_urls/tests.py +++ b/tests/admin_custom_urls/tests.py @@ -3,8 +3,7 @@ from __future__ import unicode_literals from django.contrib.admin.utils import quote from django.core.urlresolvers import reverse from django.template.response import TemplateResponse -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from .models import Action, Person, Car diff --git a/tests/admin_docs/tests.py b/tests/admin_docs/tests.py index 9f5ace0360f..d2f8386bdb1 100644 --- a/tests/admin_docs/tests.py +++ b/tests/admin_docs/tests.py @@ -5,8 +5,7 @@ from django.contrib.sites.models import Site from django.contrib.admindocs import utils from django.contrib.auth.models import User from django.core.urlresolvers import reverse -from django.test import TestCase -from django.test.utils import modify_settings, override_settings +from django.test import TestCase, modify_settings, override_settings class MiscTests(TestCase): diff --git a/tests/admin_filters/tests.py b/tests/admin_filters/tests.py index 73814470519..17c67929dcb 100644 --- a/tests/admin_filters/tests.py +++ b/tests/admin_filters/tests.py @@ -8,9 +8,9 @@ from django.contrib.admin.views.main import ChangeList from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from django.core.exceptions import ImproperlyConfigured -from django.test import TestCase, RequestFactory -from django.test.utils import override_settings, six +from django.test import TestCase, RequestFactory, override_settings from django.utils.encoding import force_text +from django.utils import six from .models import Book, Department, Employee diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py index 8d6fc974261..e840e21b81a 100644 --- a/tests/admin_inlines/tests.py +++ b/tests/admin_inlines/tests.py @@ -4,8 +4,7 @@ from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase from django.contrib.admin.helpers import InlineAdminForm from django.contrib.auth.models import User, Permission from django.contrib.contenttypes.models import ContentType -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings # local test models from .admin import InnerInline diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index c813ee84378..d01a37725a8 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -29,7 +29,7 @@ from django.forms.utils import ErrorList from django.template.response import TemplateResponse from django.test import TestCase from django.test.utils import patch_logger -from django.test.utils import override_settings +from django.test import override_settings from django.utils import formats from django.utils import translation from django.utils.cache import get_max_age diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index 04fe083eea2..33833f3effd 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -18,7 +18,7 @@ from django.core.files.storage import default_storage from django.core.files.uploadedfile import SimpleUploadedFile from django.db.models import CharField, DateField from django.test import TestCase as DjangoTestCase -from django.test.utils import override_settings +from django.test import override_settings from django.utils import six from django.utils import translation diff --git a/tests/backends/tests.py b/tests/backends/tests.py index 3a79b794113..a4743aeb41d 100644 --- a/tests/backends/tests.py +++ b/tests/backends/tests.py @@ -20,9 +20,9 @@ from django.db.models import Sum, Avg, Variance, StdDev from django.db.models.fields import (AutoField, DateField, DateTimeField, DecimalField, IntegerField, TimeField) from django.db.utils import ConnectionHandler -from django.test import (TestCase, skipUnlessDBFeature, skipIfDBFeature, - TransactionTestCase) -from django.test.utils import override_settings, str_prefix +from django.test import (TestCase, TransactionTestCase, override_settings, + skipUnlessDBFeature, skipIfDBFeature) +from django.test.utils import str_prefix from django.utils import six from django.utils.six.moves import xrange diff --git a/tests/bulk_create/tests.py b/tests/bulk_create/tests.py index 9bb95acb728..367cbde04df 100644 --- a/tests/bulk_create/tests.py +++ b/tests/bulk_create/tests.py @@ -4,7 +4,7 @@ from operator import attrgetter from django.db import connection from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature -from django.test.utils import override_settings +from django.test import override_settings from .models import Country, Restaurant, Pizzeria, State, TwoFields diff --git a/tests/cache/tests.py b/tests/cache/tests.py index 12e75e24b7c..e17bad1523e 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -23,8 +23,8 @@ from django.middleware.cache import (FetchFromCacheMiddleware, UpdateCacheMiddleware, CacheMiddleware) from django.template import Template from django.template.response import TemplateResponse -from django.test import TestCase, TransactionTestCase, RequestFactory -from django.test.utils import (override_settings, IgnoreDeprecationWarningsMixin, +from django.test import TestCase, TransactionTestCase, RequestFactory, override_settings +from django.test.utils import (IgnoreDeprecationWarningsMixin, IgnorePendingDeprecationWarningsMixin) from django.utils import six from django.utils import timezone diff --git a/tests/comment_tests/tests/__init__.py b/tests/comment_tests/tests/__init__.py index 2e247079f88..5f73a995ca6 100644 --- a/tests/comment_tests/tests/__init__.py +++ b/tests/comment_tests/tests/__init__.py @@ -3,8 +3,7 @@ from django.contrib.comments.forms import CommentForm from django.contrib.comments.models import Comment from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from ..models import Article, Author diff --git a/tests/comment_tests/tests/test_comment_form.py b/tests/comment_tests/tests/test_comment_form.py index 205b4150e81..d4399fbd2ab 100644 --- a/tests/comment_tests/tests/test_comment_form.py +++ b/tests/comment_tests/tests/test_comment_form.py @@ -3,7 +3,7 @@ import time from django.conf import settings from django.contrib.comments.forms import CommentForm from django.contrib.comments.models import Comment -from django.test.utils import override_settings +from django.test import override_settings from . import CommentTestCase from ..models import Article diff --git a/tests/comment_tests/tests/test_comment_utils_moderators.py b/tests/comment_tests/tests/test_comment_utils_moderators.py index e61be48d8b0..9de37e47e23 100644 --- a/tests/comment_tests/tests/test_comment_utils_moderators.py +++ b/tests/comment_tests/tests/test_comment_utils_moderators.py @@ -2,7 +2,7 @@ from django.contrib.comments.models import Comment from django.contrib.comments.moderation import (moderator, CommentModerator, AlreadyModerated) from django.core import mail -from django.test.utils import override_settings +from django.test import override_settings from . import CommentTestCase from ..models import Entry diff --git a/tests/csrf_tests/tests.py b/tests/csrf_tests/tests.py index ac48c17af69..4c9153f3a5e 100644 --- a/tests/csrf_tests/tests.py +++ b/tests/csrf_tests/tests.py @@ -7,8 +7,7 @@ from django.core.context_processors import csrf from django.http import HttpRequest, HttpResponse from django.middleware.csrf import CsrfViewMiddleware, CSRF_KEY_LENGTH from django.template import RequestContext, Template -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.views.decorators.csrf import csrf_exempt, requires_csrf_token, ensure_csrf_cookie diff --git a/tests/defer_regress/tests.py b/tests/defer_regress/tests.py index 442af9f7cf7..b12b3b61b0a 100644 --- a/tests/defer_regress/tests.py +++ b/tests/defer_regress/tests.py @@ -6,8 +6,7 @@ from django.apps import app_cache from django.contrib.contenttypes.models import ContentType from django.contrib.sessions.backends.db import SessionStore from django.db.models import Count -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from .models import ( ResolveThis, Item, RelatedItem, Child, Leaf, Proxy, SimpleItem, Feature, diff --git a/tests/file_storage/tests.py b/tests/file_storage/tests.py index 20eaf4c89c4..2f047f049aa 100644 --- a/tests/file_storage/tests.py +++ b/tests/file_storage/tests.py @@ -21,7 +21,7 @@ from django.core.files.base import File, ContentFile from django.core.files.storage import FileSystemStorage, get_storage_class from django.core.files.uploadedfile import SimpleUploadedFile from django.test import LiveServerTestCase, SimpleTestCase -from django.test.utils import override_settings +from django.test import override_settings from django.utils import six from django.utils.six.moves.urllib.request import urlopen from django.utils._os import upath diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py index 7aa67976306..f4e4ea31b29 100644 --- a/tests/file_uploads/tests.py +++ b/tests/file_uploads/tests.py @@ -14,7 +14,7 @@ from django.core.files import temp as tempfile from django.core.files.uploadedfile import SimpleUploadedFile from django.http.multipartparser import MultiPartParser from django.test import TestCase, client -from django.test.utils import override_settings +from django.test import override_settings from django.utils.encoding import force_bytes from django.utils.six import StringIO diff --git a/tests/fixtures_regress/tests.py b/tests/fixtures_regress/tests.py index 3757dc51802..6984db30c63 100644 --- a/tests/fixtures_regress/tests.py +++ b/tests/fixtures_regress/tests.py @@ -15,7 +15,7 @@ from django.db import transaction, IntegrityError from django.db.models import signals from django.test import (TestCase, TransactionTestCase, skipIfDBFeature, skipUnlessDBFeature) -from django.test.utils import override_settings +from django.test import override_settings from django.utils.encoding import force_text from django.utils._os import upath from django.utils import six diff --git a/tests/forms_tests/tests/test_extra.py b/tests/forms_tests/tests/test_extra.py index 7988b52da4f..100c655117b 100644 --- a/tests/forms_tests/tests/test_extra.py +++ b/tests/forms_tests/tests/test_extra.py @@ -12,8 +12,7 @@ from django.forms import ( ) from django.forms.extras import SelectDateWidget from django.forms.utils import ErrorList -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils import six from django.utils import translation from django.utils.dates import MONTHS_AP diff --git a/tests/forms_tests/tests/test_input_formats.py b/tests/forms_tests/tests/test_input_formats.py index b9c29c76098..f939821c75f 100644 --- a/tests/forms_tests/tests/test_input_formats.py +++ b/tests/forms_tests/tests/test_input_formats.py @@ -1,7 +1,7 @@ from datetime import time, date, datetime from django import forms -from django.test.utils import override_settings +from django.test import override_settings from django.utils.translation import activate, deactivate from django.test import SimpleTestCase diff --git a/tests/forms_tests/tests/test_media.py b/tests/forms_tests/tests/test_media.py index 492655505cd..c44e443eace 100644 --- a/tests/forms_tests/tests/test_media.py +++ b/tests/forms_tests/tests/test_media.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- from django.forms import Media, TextInput, CharField, Form, MultiWidget from django.template import Template, Context -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings @override_settings( diff --git a/tests/forms_tests/tests/test_widgets.py b/tests/forms_tests/tests/test_widgets.py index 21134d1a241..4bbed3f0a99 100644 --- a/tests/forms_tests/tests/test_widgets.py +++ b/tests/forms_tests/tests/test_widgets.py @@ -18,8 +18,7 @@ from django.forms.widgets import RadioFieldRenderer from django.utils.safestring import mark_safe from django.utils import six from django.utils.translation import activate, deactivate, override -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils.encoding import python_2_unicode_compatible, force_text from ..models import Article diff --git a/tests/generic_inline_admin/tests.py b/tests/generic_inline_admin/tests.py index 09a802a1bcd..e35f0d639a5 100644 --- a/tests/generic_inline_admin/tests.py +++ b/tests/generic_inline_admin/tests.py @@ -8,8 +8,7 @@ from django.contrib.contenttypes.generic import ( generic_inlineformset_factory, GenericTabularInline) from django.forms.formsets import DEFAULT_MAX_NUM from django.forms.models import ModelForm -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings # local test models from .admin import MediaInline, MediaPermanentInline diff --git a/tests/generic_views/test_dates.py b/tests/generic_views/test_dates.py index 944a3dcfe3e..07cb13a3ca7 100644 --- a/tests/generic_views/test_dates.py +++ b/tests/generic_views/test_dates.py @@ -3,8 +3,8 @@ from __future__ import unicode_literals import datetime from django.core.exceptions import ImproperlyConfigured -from django.test import TestCase, skipUnlessDBFeature -from django.test.utils import override_settings, requires_tz_support +from django.test import TestCase, override_settings, skipUnlessDBFeature +from django.test.utils import requires_tz_support from django.utils import timezone from .models import Book, BookSigning diff --git a/tests/generic_views/test_list.py b/tests/generic_views/test_list.py index e572af8e32f..a6a5c76ff85 100644 --- a/tests/generic_views/test_list.py +++ b/tests/generic_views/test_list.py @@ -1,8 +1,7 @@ from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.views.generic.base import View from django.utils.encoding import force_str diff --git a/tests/handlers/tests.py b/tests/handlers/tests.py index f5dc7c8531b..ae8b9529f54 100644 --- a/tests/handlers/tests.py +++ b/tests/handlers/tests.py @@ -6,7 +6,7 @@ from django.core.handlers.wsgi import WSGIHandler, WSGIRequest from django.core.signals import request_started, request_finished from django.db import close_old_connections, connection from django.test import RequestFactory, TestCase, TransactionTestCase -from django.test.utils import override_settings +from django.test import override_settings from django.utils.encoding import force_str from django.utils import six diff --git a/tests/i18n/contenttypes/tests.py b/tests/i18n/contenttypes/tests.py index c48f8fc6dd2..894ae0a3c73 100644 --- a/tests/i18n/contenttypes/tests.py +++ b/tests/i18n/contenttypes/tests.py @@ -4,8 +4,8 @@ from __future__ import unicode_literals import os from django.contrib.contenttypes.models import ContentType -from django.test import TestCase -from django.test.utils import override_settings, TransRealMixin +from django.test import TestCase, override_settings +from django.test.utils import TransRealMixin from django.utils._os import upath from django.utils import six from django.utils import translation diff --git a/tests/i18n/patterns/tests.py b/tests/i18n/patterns/tests.py index 78f5a46aae7..a96fe1f54f2 100644 --- a/tests/i18n/patterns/tests.py +++ b/tests/i18n/patterns/tests.py @@ -6,8 +6,7 @@ from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse, clear_url_caches from django.http import HttpResponsePermanentRedirect from django.middleware.locale import LocaleMiddleware -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.template import Template, Context from django.utils._os import upath from django.utils import translation diff --git a/tests/i18n/test_compilation.py b/tests/i18n/test_compilation.py index 0b8365b3c95..ae92f6f3680 100644 --- a/tests/i18n/test_compilation.py +++ b/tests/i18n/test_compilation.py @@ -4,7 +4,7 @@ import unittest from django.core.management import call_command, CommandError from django.core.management.utils import find_command from django.test import SimpleTestCase -from django.test.utils import override_settings +from django.test import override_settings from django.utils import translation from django.utils._os import upath from django.utils.six import StringIO diff --git a/tests/i18n/test_extraction.py b/tests/i18n/test_extraction.py index da3670ff10f..bd187000762 100644 --- a/tests/i18n/test_extraction.py +++ b/tests/i18n/test_extraction.py @@ -12,7 +12,7 @@ from django.conf import settings from django.core import management from django.core.management.utils import find_command from django.test import SimpleTestCase -from django.test.utils import override_settings +from django.test import override_settings from django.utils.encoding import force_text from django.utils._os import upath from django.utils import six diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py index d8d2daaf0d4..116364790f0 100644 --- a/tests/i18n/tests.py +++ b/tests/i18n/tests.py @@ -11,8 +11,8 @@ from threading import local from django.conf import settings from django.template import Template, Context from django.template.base import TemplateSyntaxError -from django.test import TestCase, RequestFactory -from django.test.utils import override_settings, TransRealMixin +from django.test import TestCase, RequestFactory, override_settings +from django.test.utils import TransRealMixin from django.utils import translation from django.utils.formats import (get_format, date_format, time_format, localize, localize_input, iter_format_modules, get_format_modules, diff --git a/tests/initial_sql_regress/tests.py b/tests/initial_sql_regress/tests.py index b04e638808e..e725f4b102a 100644 --- a/tests/initial_sql_regress/tests.py +++ b/tests/initial_sql_regress/tests.py @@ -1,8 +1,7 @@ from django.core.management.color import no_style from django.core.management.sql import custom_sql_for_model from django.db import connections, DEFAULT_DB_ALIAS -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from .models import Simple diff --git a/tests/logging_tests/tests.py b/tests/logging_tests/tests.py index 1f9c8920c9b..a6791cfa76e 100644 --- a/tests/logging_tests/tests.py +++ b/tests/logging_tests/tests.py @@ -5,8 +5,8 @@ import warnings from django.conf import LazySettings from django.core import mail -from django.test import TestCase, RequestFactory -from django.test.utils import override_settings, patch_logger +from django.test import TestCase, RequestFactory, override_settings +from django.test.utils import patch_logger from django.utils.encoding import force_text from django.utils.log import (CallbackFilter, RequireDebugFalse, RequireDebugTrue) diff --git a/tests/mail/tests.py b/tests/mail/tests.py index 9683374fc5a..c9e4a06eaa8 100644 --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -19,7 +19,7 @@ from django.core.mail import (EmailMessage, mail_admins, mail_managers, from django.core.mail.backends import console, dummy, locmem, filebased, smtp from django.core.mail.message import BadHeaderError from django.test import SimpleTestCase -from django.test.utils import override_settings +from django.test import override_settings from django.utils.encoding import force_str, force_text from django.utils.six import PY3, StringIO, string_types from django.utils.translation import ugettext_lazy diff --git a/tests/managers_regress/tests.py b/tests/managers_regress/tests.py index 9d7e0d81741..2b8e183e82f 100644 --- a/tests/managers_regress/tests.py +++ b/tests/managers_regress/tests.py @@ -3,8 +3,7 @@ from __future__ import unicode_literals from django.apps import app_cache from django.db import models from django.template import Context, Template -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils.encoding import force_text from .models import ( diff --git a/tests/middleware/tests.py b/tests/middleware/tests.py index 0124e33c982..d4b8827f7b5 100644 --- a/tests/middleware/tests.py +++ b/tests/middleware/tests.py @@ -18,8 +18,8 @@ from django.middleware.common import CommonMiddleware, BrokenLinkEmailsMiddlewar from django.middleware.http import ConditionalGetMiddleware from django.middleware.gzip import GZipMiddleware from django.middleware.transaction import TransactionMiddleware -from django.test import TransactionTestCase, TestCase, RequestFactory -from django.test.utils import override_settings, IgnoreDeprecationWarningsMixin +from django.test import TransactionTestCase, TestCase, RequestFactory, override_settings +from django.test.utils import IgnoreDeprecationWarningsMixin from django.utils import six from django.utils.encoding import force_str from django.utils.six.moves import xrange diff --git a/tests/middleware_exceptions/tests.py b/tests/middleware_exceptions/tests.py index 47852f35faa..b11986d4d0d 100644 --- a/tests/middleware_exceptions/tests.py +++ b/tests/middleware_exceptions/tests.py @@ -5,8 +5,7 @@ from django.core.signals import got_request_exception from django.http import HttpResponse from django.template.response import TemplateResponse from django.template import Template -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings class TestException(Exception): diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py index fcb460decca..9f740f72a2a 100644 --- a/tests/migrations/test_commands.py +++ b/tests/migrations/test_commands.py @@ -7,7 +7,7 @@ import shutil from django.apps import app_cache from django.core.management import call_command, CommandError -from django.test.utils import override_settings +from django.test import override_settings from django.utils import six from django.utils._os import upath from django.utils.encoding import force_text diff --git a/tests/migrations/test_executor.py b/tests/migrations/test_executor.py index 5c0131d1d37..e8dcacd80e0 100644 --- a/tests/migrations/test_executor.py +++ b/tests/migrations/test_executor.py @@ -1,6 +1,7 @@ -from django.test.utils import override_settings from django.db import connection from django.db.migrations.executor import MigrationExecutor +from django.test import override_settings + from .test_base import MigrationTestBase diff --git a/tests/migrations/test_loader.py b/tests/migrations/test_loader.py index 80ac9ffd739..4f0b463f99b 100644 --- a/tests/migrations/test_loader.py +++ b/tests/migrations/test_loader.py @@ -1,7 +1,6 @@ from unittest import skipIf -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.db import connection from django.db.migrations.loader import MigrationLoader, AmbiguityError from django.db.migrations.recorder import MigrationRecorder diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py index 38bfcc25ddf..0c7a115fef3 100644 --- a/tests/modeladmin/tests.py +++ b/tests/modeladmin/tests.py @@ -13,8 +13,8 @@ from django.contrib.admin import (SimpleListFilter, from django.core.exceptions import ImproperlyConfigured from django.forms.models import BaseModelFormSet from django.forms.widgets import Select -from django.test import TestCase -from django.test.utils import str_prefix, override_settings +from django.test import TestCase, override_settings +from django.test.utils import str_prefix from django.utils import six from .models import Band, Concert, ValidationTestModel, ValidationTestInlineModel diff --git a/tests/multiple_database/tests.py b/tests/multiple_database/tests.py index 222d236bb04..8ffe00578b9 100644 --- a/tests/multiple_database/tests.py +++ b/tests/multiple_database/tests.py @@ -10,8 +10,7 @@ from django.core import management from django.db import connections, router, DEFAULT_DB_ALIAS, transaction from django.db.models import signals from django.db.utils import ConnectionRouter -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils.six import StringIO from .models import Book, Person, Pet, Review, UserProfile diff --git a/tests/prefetch_related/tests.py b/tests/prefetch_related/tests.py index 7570bdce6e2..5dfca0fa99e 100644 --- a/tests/prefetch_related/tests.py +++ b/tests/prefetch_related/tests.py @@ -3,8 +3,7 @@ from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.db import connection from django.db.models import Prefetch -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils import six from .models import (Author, Book, Reader, Qualification, Teacher, Department, diff --git a/tests/proxy_models/tests.py b/tests/proxy_models/tests.py index 800fc42e6d2..346924e3209 100644 --- a/tests/proxy_models/tests.py +++ b/tests/proxy_models/tests.py @@ -7,8 +7,7 @@ from django.core import management from django.core.exceptions import FieldError from django.db import models, DEFAULT_DB_ALIAS from django.db.models import signals -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from .models import (MyPerson, Person, StatusPerson, LowerStatusPerson, diff --git a/tests/requests/tests.py b/tests/requests/tests.py index 850cf70c2ff..bb563693717 100644 --- a/tests/requests/tests.py +++ b/tests/requests/tests.py @@ -13,9 +13,9 @@ from django.core.exceptions import SuspiciousOperation from django.core.handlers.wsgi import WSGIRequest, LimitedStream from django.http import (HttpRequest, HttpResponse, parse_cookie, build_request_repr, UnreadablePostError, RawPostDataException) -from django.test import SimpleTestCase, TransactionTestCase +from django.test import SimpleTestCase, TransactionTestCase, override_settings from django.test.client import FakePayload -from django.test.utils import override_settings, str_prefix +from django.test.utils import str_prefix from django.utils import six from django.utils.http import cookie_date, urlencode from django.utils.six.moves.urllib.parse import urlencode as original_urlencode diff --git a/tests/select_for_update/tests.py b/tests/select_for_update/tests.py index 6fadbdb7997..278458ed397 100644 --- a/tests/select_for_update/tests.py +++ b/tests/select_for_update/tests.py @@ -8,7 +8,7 @@ from django.db import transaction, connection, router from django.db.utils import ConnectionHandler, DEFAULT_DB_ALIAS, DatabaseError from django.test import (TransactionTestCase, skipIfDBFeature, skipUnlessDBFeature) -from django.test.utils import override_settings +from django.test import override_settings from multiple_database.routers import TestRouter diff --git a/tests/serializers/tests.py b/tests/serializers/tests.py index b9e3bb543fc..6433101878c 100644 --- a/tests/serializers/tests.py +++ b/tests/serializers/tests.py @@ -16,8 +16,8 @@ except ImportError: from django.core import management, serializers from django.db import transaction, connection -from django.test import TestCase, TransactionTestCase -from django.test.utils import Approximate, override_settings +from django.test import TestCase, TransactionTestCase, override_settings +from django.test.utils import Approximate from django.utils import six from django.utils.six import StringIO diff --git a/tests/servers/tests.py b/tests/servers/tests.py index 5ce86d35296..8f8a310c713 100644 --- a/tests/servers/tests.py +++ b/tests/servers/tests.py @@ -9,7 +9,7 @@ import socket from django.core.exceptions import ImproperlyConfigured from django.test import LiveServerTestCase -from django.test.utils import override_settings +from django.test import override_settings from django.utils.http import urlencode from django.utils.six.moves.urllib.error import HTTPError from django.utils.six.moves.urllib.request import urlopen diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py index fd3f543553e..2225862f7fb 100644 --- a/tests/settings_tests/tests.py +++ b/tests/settings_tests/tests.py @@ -5,8 +5,8 @@ import warnings from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.http import HttpRequest -from django.test import SimpleTestCase, TransactionTestCase, TestCase, signals -from django.test.utils import modify_settings, override_settings +from django.test import (SimpleTestCase, TransactionTestCase, TestCase, + modify_settings, override_settings, signals) from django.utils import six diff --git a/tests/staticfiles_tests/test_liveserver.py b/tests/staticfiles_tests/test_liveserver.py index 6fa64240cc9..b7e309e1a78 100644 --- a/tests/staticfiles_tests/test_liveserver.py +++ b/tests/staticfiles_tests/test_liveserver.py @@ -7,7 +7,7 @@ django.test.LiveServerTestCase. import os from django.core.exceptions import ImproperlyConfigured -from django.test.utils import override_settings +from django.test import override_settings from django.utils.six.moves.urllib.request import urlopen from django.utils._os import upath diff --git a/tests/staticfiles_tests/tests.py b/tests/staticfiles_tests/tests.py index 3ad8249e763..19c244e3539 100644 --- a/tests/staticfiles_tests/tests.py +++ b/tests/staticfiles_tests/tests.py @@ -14,8 +14,7 @@ from django.conf import settings from django.core.cache.backends.base import BaseCache from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils.encoding import force_text from django.utils.functional import empty from django.utils._os import rmtree_errorhandler, upath diff --git a/tests/swappable_models/tests.py b/tests/swappable_models/tests.py index 0beb95af3e1..cdebbef374e 100644 --- a/tests/swappable_models/tests.py +++ b/tests/swappable_models/tests.py @@ -6,8 +6,7 @@ from django.apps import app_cache from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.core import management -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from swappable_models.models import Article diff --git a/tests/template_tests/test_nodelist.py b/tests/template_tests/test_nodelist.py index 12abd20331c..1c48d3f7cec 100644 --- a/tests/template_tests/test_nodelist.py +++ b/tests/template_tests/test_nodelist.py @@ -2,7 +2,7 @@ from unittest import TestCase from django.template import VariableNode, Context from django.template.loader import get_template_from_string -from django.test.utils import override_settings +from django.test import override_settings class NodelistTest(TestCase): diff --git a/tests/template_tests/test_parser.py b/tests/template_tests/test_parser.py index 275d7ea4be6..017e78a8639 100644 --- a/tests/template_tests/test_parser.py +++ b/tests/template_tests/test_parser.py @@ -7,7 +7,7 @@ from unittest import TestCase from django.template import (TokenParser, FilterExpression, Parser, Variable, Template, TemplateSyntaxError, Library) -from django.test.utils import override_settings +from django.test import override_settings from django.utils import six diff --git a/tests/template_tests/test_response.py b/tests/template_tests/test_response.py index f5f6158b2f9..17d8f11ba5f 100644 --- a/tests/template_tests/test_response.py +++ b/tests/template_tests/test_response.py @@ -10,7 +10,7 @@ from django.conf import settings from django.template import Template, Context from django.template.response import (TemplateResponse, SimpleTemplateResponse, ContentNotRenderedError) -from django.test.utils import override_settings +from django.test import override_settings from django.utils._os import upath diff --git a/tests/test_client/tests.py b/tests/test_client/tests.py index d914a89043d..3693b337521 100644 --- a/tests/test_client/tests.py +++ b/tests/test_client/tests.py @@ -24,7 +24,7 @@ from __future__ import unicode_literals from django.core import mail from django.test import Client, TestCase, RequestFactory -from django.test.utils import override_settings +from django.test import override_settings from .views import get_view diff --git a/tests/test_client_regress/tests.py b/tests/test_client_regress/tests.py index 1bee0b95e7d..afb3993cd16 100644 --- a/tests/test_client_regress/tests.py +++ b/tests/test_client_regress/tests.py @@ -12,9 +12,9 @@ from django.core.urlresolvers import reverse from django.template import (TemplateSyntaxError, Context, Template, loader) import django.template.context -from django.test import Client, TestCase +from django.test import Client, TestCase, override_settings from django.test.client import encode_file, RequestFactory -from django.test.utils import ContextList, override_settings, str_prefix +from django.test.utils import ContextList, str_prefix from django.template.response import SimpleTemplateResponse from django.utils._os import upath from django.utils.translation import ugettext_lazy diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py index 5eb98fcf00a..4b45ddbb7b7 100644 --- a/tests/timezones/tests.py +++ b/tests/timezones/tests.py @@ -17,8 +17,8 @@ from django.core.urlresolvers import reverse from django.db.models import Min, Max from django.http import HttpRequest from django.template import Context, RequestContext, Template, TemplateSyntaxError -from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature -from django.test.utils import override_settings, requires_tz_support +from django.test import TestCase, override_settings, skipIfDBFeature, skipUnlessDBFeature +from django.test.utils import requires_tz_support from django.utils import six from django.utils import timezone diff --git a/tests/transactions_regress/tests.py b/tests/transactions_regress/tests.py index 24bd860731e..cada46edb2f 100644 --- a/tests/transactions_regress/tests.py +++ b/tests/transactions_regress/tests.py @@ -5,8 +5,8 @@ from unittest import skipIf, skipUnless, SkipTest from django.db import (connection, connections, transaction, DEFAULT_DB_ALIAS, DatabaseError, IntegrityError) from django.db.transaction import commit_on_success, commit_manually, TransactionManagementError -from django.test import TransactionTestCase, skipUnlessDBFeature -from django.test.utils import override_settings, IgnoreDeprecationWarningsMixin +from django.test import TransactionTestCase, override_settings, skipUnlessDBFeature +from django.test.utils import IgnoreDeprecationWarningsMixin from .models import Mod, M2mA, M2mB, SubMod diff --git a/tests/urlpatterns_reverse/tests.py b/tests/urlpatterns_reverse/tests.py index da0c5bee1a5..a7fb342da76 100644 --- a/tests/urlpatterns_reverse/tests.py +++ b/tests/urlpatterns_reverse/tests.py @@ -12,8 +12,7 @@ from django.core.urlresolvers import (reverse, reverse_lazy, resolve, get_callab RegexURLPattern) from django.http import HttpRequest, HttpResponseRedirect, HttpResponsePermanentRedirect from django.shortcuts import redirect -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils import six from . import urlconf_outer, middleware, views diff --git a/tests/utils_tests/test_dateformat.py b/tests/utils_tests/test_dateformat.py index ebf46f3ee76..c0b42db3dcd 100644 --- a/tests/utils_tests/test_dateformat.py +++ b/tests/utils_tests/test_dateformat.py @@ -3,8 +3,7 @@ from __future__ import unicode_literals from datetime import datetime, date import time -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings from django.utils.dateformat import format from django.utils import dateformat from django.utils.timezone import utc, get_fixed_timezone, get_default_timezone, make_aware diff --git a/tests/utils_tests/test_timezone.py b/tests/utils_tests/test_timezone.py index fe67d105c3f..1d608d0951e 100644 --- a/tests/utils_tests/test_timezone.py +++ b/tests/utils_tests/test_timezone.py @@ -3,7 +3,7 @@ import datetime import pickle import unittest -from django.test.utils import override_settings +from django.test import override_settings from django.utils import timezone diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py index 261c534b2b0..ca08f3cce94 100644 --- a/tests/view_tests/tests/test_debug.py +++ b/tests/view_tests/tests/test_debug.py @@ -16,9 +16,9 @@ from django.core import mail from django.core.files.uploadedfile import SimpleUploadedFile from django.core.urlresolvers import reverse from django.template.base import TemplateDoesNotExist -from django.test import TestCase, RequestFactory -from django.test.utils import (override_settings, setup_test_template_loader, - restore_template_loaders) +from django.test import TestCase, RequestFactory, override_settings +from django.test.utils import ( + setup_test_template_loader, restore_template_loaders) from django.utils.encoding import force_text, force_bytes from django.utils import six from django.views.debug import ExceptionReporter diff --git a/tests/view_tests/tests/test_shortcuts.py b/tests/view_tests/tests/test_shortcuts.py index eb08433a44f..7b14637143b 100644 --- a/tests/view_tests/tests/test_shortcuts.py +++ b/tests/view_tests/tests/test_shortcuts.py @@ -1,5 +1,4 @@ -from django.test import TestCase -from django.test.utils import override_settings +from django.test import TestCase, override_settings @override_settings( diff --git a/tests/view_tests/tests/test_static.py b/tests/view_tests/tests/test_static.py index 34e4021080d..8b051c5e626 100644 --- a/tests/view_tests/tests/test_static.py +++ b/tests/view_tests/tests/test_static.py @@ -6,8 +6,7 @@ import unittest from django.conf.urls.static import static from django.http import HttpResponseNotModified -from django.test import SimpleTestCase -from django.test.utils import override_settings +from django.test import SimpleTestCase, override_settings from django.utils.http import http_date from django.views.static import was_modified_since diff --git a/tests/wsgi/tests.py b/tests/wsgi/tests.py index 90397bb742c..567ca94f98c 100644 --- a/tests/wsgi/tests.py +++ b/tests/wsgi/tests.py @@ -7,9 +7,8 @@ from django.core.servers.basehttp import get_internal_wsgi_application from django.core.signals import request_started from django.core.wsgi import get_wsgi_application from django.db import close_old_connections -from django.test import TestCase +from django.test import TestCase, override_settings from django.test.client import RequestFactory -from django.test.utils import override_settings from django.utils import six