Fixed a few more imports of django.utils.unittest.
One import per line please! Refs #20680.
This commit is contained in:
parent
09b446dfe8
commit
e021b87c00
|
@ -1,6 +1,7 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import re
|
||||
import unittest
|
||||
from unittest import skipUnless
|
||||
|
||||
from django.db import connection
|
||||
|
@ -10,7 +11,7 @@ from django.contrib.gis.tests.utils import (
|
|||
no_mysql, no_oracle, no_spatialite,
|
||||
mysql, oracle, postgis, spatialite)
|
||||
from django.test import TestCase
|
||||
from django.utils import six, unittest
|
||||
from django.utils import six
|
||||
|
||||
if HAS_GEOS:
|
||||
from django.contrib.gis.geos import (fromstr, GEOSGeometry,
|
||||
|
|
|
@ -4,6 +4,7 @@ from __future__ import absolute_import, unicode_literals
|
|||
import os
|
||||
import re
|
||||
import datetime
|
||||
import unittest
|
||||
try:
|
||||
from urllib.parse import urljoin
|
||||
except ImportError: # Python 2
|
||||
|
@ -31,7 +32,8 @@ from django.forms.util import ErrorList
|
|||
from django.template.response import TemplateResponse
|
||||
from django.test import TestCase
|
||||
from django.test.utils import patch_logger
|
||||
from django.utils import formats, translation, unittest
|
||||
from django.utils import formats
|
||||
from django.utils import translation
|
||||
from django.utils.cache import get_max_age
|
||||
from django.utils.encoding import iri_to_uri, force_bytes
|
||||
from django.utils.html import escape
|
||||
|
|
|
@ -5,6 +5,7 @@ from __future__ import absolute_import, unicode_literals
|
|||
import datetime
|
||||
from decimal import Decimal
|
||||
import threading
|
||||
import unittest
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.color import no_style
|
||||
|
@ -21,7 +22,7 @@ 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.utils import six, unittest
|
||||
from django.utils import six
|
||||
from django.utils.six.moves import xrange
|
||||
|
||||
from . import models
|
||||
|
@ -469,7 +470,7 @@ class BackendTestCase(TestCase):
|
|||
def create_squares_with_executemany(self, args):
|
||||
self.create_squares(args, 'format', True)
|
||||
|
||||
def create_squares(self, args, paramstyle, multiple):
|
||||
def create_squares(self, args, paramstyle, multiple):
|
||||
cursor = connection.cursor()
|
||||
opts = models.Square._meta
|
||||
tbl = connection.introspection.table_name_converter(opts.db_table)
|
||||
|
@ -541,7 +542,7 @@ class BackendTestCase(TestCase):
|
|||
# same test for DebugCursorWrapper
|
||||
self.create_squares(args, 'pyformat', multiple=True)
|
||||
self.assertEqual(models.Square.objects.count(), 9)
|
||||
|
||||
|
||||
def test_unicode_fetches(self):
|
||||
#6254: fetchone, fetchmany, fetchall return strings as unicode objects
|
||||
qn = connection.ops.quote_name
|
||||
|
|
|
@ -6,13 +6,14 @@ from __future__ import absolute_import, unicode_literals
|
|||
|
||||
import hashlib
|
||||
import os
|
||||
import pickle
|
||||
import random
|
||||
import re
|
||||
import string
|
||||
import tempfile
|
||||
import time
|
||||
import unittest
|
||||
import warnings
|
||||
import pickle
|
||||
|
||||
from django.conf import settings
|
||||
from django.core import management
|
||||
|
@ -29,7 +30,9 @@ 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.utils import six, timezone, translation, unittest
|
||||
from django.utils import six
|
||||
from django.utils import timezone
|
||||
from django.utils import translation
|
||||
from django.utils.cache import (patch_vary_headers, get_cache_key,
|
||||
learn_cache_key, patch_cache_control, patch_response_headers)
|
||||
from django.utils.encoding import force_text
|
||||
|
|
|
@ -3,9 +3,11 @@ from __future__ import unicode_literals
|
|||
from datetime import datetime, date
|
||||
import os
|
||||
import time
|
||||
import unittest
|
||||
|
||||
from django.utils.dateformat import format
|
||||
from django.utils import dateformat, translation, unittest
|
||||
from django.utils import dateformat
|
||||
from django.utils import translation
|
||||
from django.utils.timezone import utc
|
||||
from django.utils.tzinfo import FixedOffset, LocalTimezone
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import datetime
|
||||
import unittest
|
||||
|
||||
from django.utils import feedgenerator
|
||||
from django.utils import tzinfo
|
||||
|
||||
from django.utils import feedgenerator, tzinfo, unittest
|
||||
|
||||
class FeedgeneratorTest(unittest.TestCase):
|
||||
"""
|
||||
|
|
|
@ -4,12 +4,13 @@ from __future__ import absolute_import
|
|||
import gettext
|
||||
import os
|
||||
from os import path
|
||||
import unittest
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.test import LiveServerTestCase, TestCase
|
||||
from django.test.utils import override_settings
|
||||
from django.utils import six, unittest
|
||||
from django.utils import six
|
||||
from django.utils._os import upath
|
||||
from django.utils.translation import override
|
||||
from django.utils.text import javascript_quote
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.core.servers.basehttp import get_internal_wsgi_application
|
||||
from django.core.signals import request_started
|
||||
|
@ -8,7 +10,7 @@ from django.db import close_old_connections
|
|||
from django.test import TestCase
|
||||
from django.test.client import RequestFactory
|
||||
from django.test.utils import override_settings
|
||||
from django.utils import six, unittest
|
||||
from django.utils import six
|
||||
|
||||
|
||||
class WSGITest(TestCase):
|
||||
|
|
Loading…
Reference in New Issue