Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed a few more imports of django.utils.unittest.

One import per line please! Refs #20680.
  • Loading branch information...
commit e021b87c0009c11aa2e62b62fc40b4b0209a8e5d 1 parent 09b446d
Aymeric Augustin authored July 01, 2013
3  django/contrib/gis/tests/geoapp/tests.py
... ...
@@ -1,6 +1,7 @@
1 1
 from __future__ import absolute_import
2 2
 
3 3
 import re
  4
+import unittest
4 5
 from unittest import skipUnless
5 6
 
6 7
 from django.db import connection
@@ -10,7 +11,7 @@
10 11
     no_mysql, no_oracle, no_spatialite,
11 12
     mysql, oracle, postgis, spatialite)
12 13
 from django.test import TestCase
13  
-from django.utils import six, unittest
  14
+from django.utils import six
14 15
 
15 16
 if HAS_GEOS:
16 17
     from django.contrib.gis.geos import (fromstr, GEOSGeometry,
4  tests/admin_views/tests.py
@@ -4,6 +4,7 @@
4 4
 import os
5 5
 import re
6 6
 import datetime
  7
+import unittest
7 8
 try:
8 9
     from urllib.parse import urljoin
9 10
 except ImportError:  # Python 2
@@ -31,7 +32,8 @@
31 32
 from django.template.response import TemplateResponse
32 33
 from django.test import TestCase
33 34
 from django.test.utils import patch_logger
34  
-from django.utils import formats, translation, unittest
  35
+from django.utils import formats
  36
+from django.utils import translation
35 37
 from django.utils.cache import get_max_age
36 38
 from django.utils.encoding import iri_to_uri, force_bytes
37 39
 from django.utils.html import escape
7  tests/backends/tests.py
@@ -5,6 +5,7 @@
5 5
 import datetime
6 6
 from decimal import Decimal
7 7
 import threading
  8
+import unittest
8 9
 
9 10
 from django.conf import settings
10 11
 from django.core.management.color import no_style
@@ -21,7 +22,7 @@
21 22
 from django.test import (TestCase, skipUnlessDBFeature, skipIfDBFeature,
22 23
     TransactionTestCase)
23 24
 from django.test.utils import override_settings, str_prefix
24  
-from django.utils import six, unittest
  25
+from django.utils import six
25 26
 from django.utils.six.moves import xrange
26 27
 
27 28
 from . import models
@@ -469,7 +470,7 @@ class BackendTestCase(TestCase):
469 470
     def create_squares_with_executemany(self, args):
470 471
         self.create_squares(args, 'format', True)
471 472
 
472  
-    def create_squares(self, args, paramstyle, multiple):    
  473
+    def create_squares(self, args, paramstyle, multiple):
473 474
         cursor = connection.cursor()
474 475
         opts = models.Square._meta
475 476
         tbl = connection.introspection.table_name_converter(opts.db_table)
@@ -541,7 +542,7 @@ def test_cursor_executemany_with_pyformat_iterator(self):
541 542
             # same test for DebugCursorWrapper
542 543
             self.create_squares(args, 'pyformat', multiple=True)
543 544
         self.assertEqual(models.Square.objects.count(), 9)
544  
-        
  545
+
545 546
     def test_unicode_fetches(self):
546 547
         #6254: fetchone, fetchmany, fetchall return strings as unicode objects
547 548
         qn = connection.ops.quote_name
7  tests/cache/tests.py
@@ -6,13 +6,14 @@
6 6
 
7 7
 import hashlib
8 8
 import os
  9
+import pickle
9 10
 import random
10 11
 import re
11 12
 import string
12 13
 import tempfile
13 14
 import time
  15
+import unittest
14 16
 import warnings
15  
-import pickle
16 17
 
17 18
 from django.conf import settings
18 19
 from django.core import management
@@ -29,7 +30,9 @@
29 30
 from django.template.response import TemplateResponse
30 31
 from django.test import TestCase, TransactionTestCase, RequestFactory
31 32
 from django.test.utils import override_settings, IgnoreDeprecationWarningsMixin
32  
-from django.utils import six, timezone, translation, unittest
  33
+from django.utils import six
  34
+from django.utils import timezone
  35
+from django.utils import translation
33 36
 from django.utils.cache import (patch_vary_headers, get_cache_key,
34 37
     learn_cache_key, patch_cache_control, patch_response_headers)
35 38
 from django.utils.encoding import force_text
4  tests/utils_tests/test_dateformat.py
@@ -3,9 +3,11 @@
3 3
 from datetime import datetime, date
4 4
 import os
5 5
 import time
  6
+import unittest
6 7
 
7 8
 from django.utils.dateformat import format
8  
-from django.utils import dateformat, translation, unittest
  9
+from django.utils import dateformat
  10
+from django.utils import translation
9 11
 from django.utils.timezone import utc
10 12
 from django.utils.tzinfo import FixedOffset, LocalTimezone
11 13
 
5  tests/utils_tests/test_feedgenerator.py
... ...
@@ -1,8 +1,11 @@
1 1
 from __future__ import unicode_literals
2 2
 
3 3
 import datetime
  4
+import unittest
  5
+
  6
+from django.utils import feedgenerator
  7
+from django.utils import tzinfo
4 8
 
5  
-from django.utils import feedgenerator, tzinfo, unittest
6 9
 
7 10
 class FeedgeneratorTest(unittest.TestCase):
8 11
     """
3  tests/view_tests/tests/test_i18n.py
@@ -4,12 +4,13 @@
4 4
 import gettext
5 5
 import os
6 6
 from os import path
  7
+import unittest
7 8
 
8 9
 from django.conf import settings
9 10
 from django.core.urlresolvers import reverse
10 11
 from django.test import LiveServerTestCase, TestCase
11 12
 from django.test.utils import override_settings
12  
-from django.utils import six, unittest
  13
+from django.utils import six
13 14
 from django.utils._os import upath
14 15
 from django.utils.translation import override
15 16
 from django.utils.text import javascript_quote
4  tests/wsgi/tests.py
... ...
@@ -1,5 +1,7 @@
1 1
 from __future__ import unicode_literals
2 2
 
  3
+import unittest
  4
+
3 5
 from django.core.exceptions import ImproperlyConfigured
4 6
 from django.core.servers.basehttp import get_internal_wsgi_application
5 7
 from django.core.signals import request_started
@@ -8,7 +10,7 @@
8 10
 from django.test import TestCase
9 11
 from django.test.client import RequestFactory
10 12
 from django.test.utils import override_settings
11  
-from django.utils import six, unittest
  13
+from django.utils import six
12 14
 
13 15
 
14 16
 class WSGITest(TestCase):

0 notes on commit e021b87

Please sign in to comment.
Something went wrong with that request. Please try again.