Permalink
Browse files

Stopped using django.utils.unittest in the test suite.

Refs #20680.
  • Loading branch information...
1 parent 7f264e0 commit cfcf4b3605f9653e4e056088d89932b2a0e4281b @aaugustin aaugustin committed Jul 1, 2013
Showing with 212 additions and 161 deletions.
  1. +1 −1 django/contrib/admin/tests.py
  2. +2 −1 django/contrib/admindocs/tests/test_fields.py
  3. +3 −2 django/contrib/auth/tests/test_hashers.py
  4. +2 −2 django/contrib/auth/tests/test_tokens.py
  5. +2 −1 django/contrib/auth/tests/utils.py
  6. +1 −1 django/contrib/formtools/tests/tests.py
  7. +3 −2 django/contrib/gis/gdal/tests/test_driver.py
  8. +2 −2 django/contrib/gis/gdal/tests/test_ds.py
  9. +4 −3 django/contrib/gis/gdal/tests/test_envelope.py
  10. +2 −2 django/contrib/gis/gdal/tests/test_geom.py
  11. +3 −2 django/contrib/gis/gdal/tests/test_srs.py
  12. +3 −2 django/contrib/gis/geoip/tests.py
  13. +2 −2 django/contrib/gis/geos/tests/test_geos.py
  14. +2 −2 django/contrib/gis/geos/tests/test_geos_mutation.py
  15. +1 −1 django/contrib/gis/geos/tests/test_io.py
  16. +3 −1 django/contrib/gis/geos/tests/test_mutable_list.py
  17. +2 −1 django/contrib/gis/tests/distapp/tests.py
  18. +1 −1 django/contrib/gis/tests/geo3d/tests.py
  19. +2 −1 django/contrib/gis/tests/geoadmin/tests.py
  20. +1 −1 django/contrib/gis/tests/geoapp/test_feeds.py
  21. +1 −1 django/contrib/gis/tests/geoapp/test_regress.py
  22. +1 −1 django/contrib/gis/tests/geoapp/test_sitemaps.py
  23. +1 −1 django/contrib/gis/tests/geoapp/tests.py
  24. +1 −1 django/contrib/gis/tests/geogapp/tests.py
  25. +1 −1 django/contrib/gis/tests/inspectapp/tests.py
  26. +3 −3 django/contrib/gis/tests/layermap/tests.py
  27. +2 −1 django/contrib/gis/tests/relatedapp/tests.py
  28. +4 −3 django/contrib/gis/tests/test_geoforms.py
  29. +2 −1 django/contrib/gis/tests/test_measure.py
  30. +2 −1 django/contrib/gis/tests/test_spatialrefsys.py
  31. +1 −1 django/contrib/humanize/tests.py
  32. +2 −1 django/contrib/messages/tests/base.py
  33. +2 −1 django/contrib/messages/tests/test_middleware.py
  34. +1 −1 django/contrib/sessions/tests.py
  35. +2 −1 django/contrib/sitemaps/tests/test_flatpages.py
  36. +1 −1 django/contrib/sitemaps/tests/test_http.py
  37. +2 −2 django/test/runner.py
  38. +9 −8 django/test/testcases.py
  39. +1 −1 docs/topics/testing/advanced.txt
  40. +2 −2 docs/topics/testing/overview.txt
  41. +2 −2 tests/admin_scripts/tests.py
  42. +1 −1 tests/admin_widgets/tests.py
  43. +0 −1 tests/aggregation_regress/tests.py
  44. +2 −1 tests/app_loading/tests.py
  45. +1 −1 tests/bash_completion/tests.py
  46. +1 −1 tests/bug639/tests.py
  47. +2 −1 tests/bug8245/tests.py
  48. +1 −1 tests/builtin_server/tests.py
  49. +1 −1 tests/db_typecasts/tests.py
  50. +1 −1 tests/decorators/tests.py
  51. +2 −1 tests/defaultfilters/tests.py
  52. +1 −1 tests/dispatch/tests/test_dispatcher.py
  53. +2 −1 tests/dispatch/tests/test_saferef.py
  54. +1 −1 tests/file_storage/tests.py
  55. +1 −1 tests/file_uploads/tests.py
  56. +1 −1 tests/files/tests.py
  57. +2 −1 tests/forms_tests/tests/test_validators.py
  58. +1 −1 tests/generic_views/test_base.py
  59. +1 −1 tests/generic_views/test_dates.py
  60. +1 −1 tests/generic_views/test_edit.py
  61. +1 −1 tests/httpwrappers/tests.py
  62. +2 −1 tests/indexes/tests.py
  63. +1 −1 tests/inspectdb/tests.py
  64. +2 −1 tests/introspection/tests.py
  65. +1 −2 tests/invalid_models/tests.py
  66. +1 −1 tests/logging_tests/tests.py
  67. +2 −2 tests/max_lengths/tests.py
  68. +1 −1 tests/middleware/tests.py
  69. +1 −1 tests/model_fields/test_imagefield.py
  70. +1 −1 tests/model_fields/tests.py
  71. +1 −1 tests/model_forms/tests.py
  72. +1 −1 tests/model_forms_regress/tests.py
  73. +2 −2 tests/model_inheritance_regress/tests.py
  74. +1 −1 tests/model_regress/tests.py
  75. +2 −1 tests/modeladmin/tests.py
  76. +1 −1 tests/pagination/tests.py
  77. +1 −1 tests/queries/tests.py
  78. +3 −3 tests/requests/tests.py
  79. +2 −1 tests/resolve_url/tests.py
  80. +1 −1 tests/select_for_update/tests.py
  81. +2 −1 tests/select_related_onetoone/tests.py
  82. +1 −1 tests/serializers/tests.py
  83. +2 −2 tests/serializers_regress/tests.py
  84. +2 −1 tests/settings_tests/tests.py
  85. +1 −1 tests/str/tests.py
  86. +4 −3 tests/template_tests/loaders.py
  87. +2 −1 tests/template_tests/test_callables.py
  88. +3 −1 tests/template_tests/test_context.py
  89. +2 −1 tests/template_tests/test_custom.py
  90. +2 −1 tests/template_tests/test_nodelist.py
  91. +2 −1 tests/template_tests/test_parser.py
  92. +2 −1 tests/template_tests/test_smartif.py
  93. +2 −1 tests/template_tests/test_unicode.py
  94. +1 −1 tests/template_tests/tests.py
  95. +1 −1 tests/test_runner/test_discover_runner.py
  96. +2 −2 tests/test_runner/tests.py
  97. +2 −1 tests/test_suite_override/tests.py
  98. +3 −2 tests/test_utils/tests.py
  99. +1 −1 tests/timezones/tests.py
  100. +1 −1 tests/transactions/tests.py
  101. +2 −1 tests/transactions_regress/tests.py
  102. +3 −1 tests/urlpatterns_reverse/tests.py
  103. +1 −1 tests/utils_tests/test_archive.py
  104. +2 −1 tests/utils_tests/test_baseconv.py
  105. +2 −2 tests/utils_tests/test_crypto.py
  106. +1 −1 tests/utils_tests/test_dateparse.py
  107. +2 −1 tests/utils_tests/test_encoding.py
  108. +2 −1 tests/utils_tests/test_functional.py
  109. +1 −1 tests/utils_tests/test_html.py
  110. +1 −1 tests/utils_tests/test_http.py
  111. +2 −1 tests/utils_tests/test_ipv6.py
  112. +2 −2 tests/utils_tests/test_module_loading.py
  113. +1 −1 tests/utils_tests/test_os_utils.py
  114. +2 −1 tests/utils_tests/test_regex_helper.py
  115. +1 −1 tests/utils_tests/test_simplelazyobject.py
  116. +2 −1 tests/utils_tests/test_termcolors.py
  117. +2 −1 tests/utils_tests/test_timezone.py
  118. +2 −1 tests/utils_tests/test_tzinfo.py
  119. +2 −1 tests/validation/test_error_messages.py
  120. +1 −1 tests/validation/test_unique.py
  121. +2 −2 tests/validators/tests.py
  122. +1 −1 tests/version/tests.py
  123. +1 −1 tests/view_tests/tests/test_debug.py
@@ -1,8 +1,8 @@
import os
+from unittest import SkipTest
from django.test import LiveServerTestCase
from django.utils.module_loading import import_by_path
-from django.utils.unittest import SkipTest
from django.utils.translation import ugettext as _
@@ -1,9 +1,10 @@
from __future__ import absolute_import, unicode_literals
+import unittest
+
from django.contrib.admindocs import views
from django.db import models
from django.db.models import fields
-from django.utils import unittest
from django.utils.translation import ugettext as _
@@ -1,13 +1,14 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
+import unittest
+from unittest import skipUnless
+
from django.conf.global_settings import PASSWORD_HASHERS as default_hashers
from django.contrib.auth.hashers import (is_password_usable, BasePasswordHasher,
check_password, make_password, PBKDF2PasswordHasher, load_hashers, PBKDF2SHA1PasswordHasher,
get_hasher, identify_hasher, UNUSABLE_PASSWORD_PREFIX, UNUSABLE_PASSWORD_SUFFIX_LENGTH)
from django.utils import six
-from django.utils import unittest
-from django.utils.unittest import skipUnless
try:
@@ -1,12 +1,12 @@
-import sys
from datetime import date, timedelta
+import sys
+import unittest
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.test import TestCase
-from django.utils import unittest
@skipIfCustomUser
@@ -1,5 +1,6 @@
+from unittest import skipIf
+
from django.conf import settings
-from django.utils.unittest import skipIf
def skipIfCustomUser(test_func):
@@ -3,14 +3,14 @@
import datetime
import os
+import unittest
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.utils._os import upath
-from django.utils import unittest
from django.contrib.formtools.tests.forms import *
@@ -1,6 +1,7 @@
+import unittest
+from unittest import skipUnless
+
from django.contrib.gis.gdal import HAS_GDAL
-from django.utils import unittest
-from django.utils.unittest import skipUnless
if HAS_GDAL:
from django.contrib.gis.gdal import Driver, OGRException
@@ -1,9 +1,9 @@
import os
+import unittest
+from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geometry.test_data import get_ds_file, TestDS, TEST_DATA
-from django.utils import unittest
-from django.utils.unittest import skipUnless
if HAS_GDAL:
from django.contrib.gis.gdal import DataSource, Envelope, OGRGeometry, OGRException, OGRIndexError, GDAL_VERSION
@@ -1,6 +1,7 @@
+import unittest
+from unittest import skipUnless
+
from django.contrib.gis.gdal import HAS_GDAL
-from django.utils import unittest
-from django.utils.unittest import skipUnless
if HAS_GDAL:
from django.contrib.gis.gdal import Envelope, OGRException
@@ -17,7 +18,7 @@ class EnvelopeTest(unittest.TestCase):
def setUp(self):
self.e = Envelope(0, 0, 5, 5)
-
+
def test01_init(self):
"Testing Envelope initilization."
e1 = Envelope((0, 0, 5, 5))
@@ -4,12 +4,12 @@
from django.utils.six.moves import cPickle as pickle
except ImportError:
import pickle
+import unittest
+from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geometry.test_data import TestDataMixin
from django.utils.six.moves import xrange
-from django.utils import unittest
-from django.utils.unittest import skipUnless
if HAS_GDAL:
from django.contrib.gis.gdal import (OGRGeometry, OGRGeomType,
@@ -1,6 +1,7 @@
+import unittest
+from unittest import skipUnless
+
from django.contrib.gis.gdal import HAS_GDAL
-from django.utils import unittest
-from django.utils.unittest import skipUnless
if HAS_GDAL:
from django.contrib.gis.gdal import SpatialReference, CoordTransform, OGRException, SRSException
@@ -2,11 +2,12 @@
from __future__ import unicode_literals
import os
+import unittest
+from unittest import skipUnless
+
from django.conf import settings
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.geoip import HAS_GEOIP
-from django.utils import unittest
-from django.utils.unittest import skipUnless
from django.utils import six
@@ -3,6 +3,8 @@
import ctypes
import json
import random
+import unittest
+from unittest import skipUnless
from binascii import a2b_hex, b2a_hex
from io import BytesIO
@@ -14,8 +16,6 @@
from django.utils.encoding import force_bytes
from django.utils import six
from django.utils.six.moves import xrange
-from django.utils import unittest
-from django.utils.unittest import skipUnless
from .. import HAS_GEOS
@@ -2,8 +2,8 @@
# Modified from original contribution by Aryeh Leib Taurog, which was
# released under the New BSD license.
-from django.utils import unittest
-from django.utils.unittest import skipUnless
+import unittest
+from unittest import skipUnless
from .. import HAS_GEOS
@@ -2,9 +2,9 @@
import binascii
import unittest
+from unittest import skipUnless
from django.contrib.gis import memoryview
-from django.utils.unittest import skipUnless
from ..import HAS_GEOS
@@ -3,9 +3,11 @@
#
# Modified from original contribution by Aryeh Leib Taurog, which was
# released under the New BSD license.
+
+import unittest
+
from django.contrib.gis.geos.mutable_list import ListMixin
from django.utils import six
-from django.utils import unittest
class UserListA(ListMixin):
@@ -1,5 +1,7 @@
from __future__ import absolute_import
+from unittest import skipUnless
+
from django.db import connection
from django.db.models import Q
from django.contrib.gis.geos import HAS_GEOS
@@ -8,7 +10,6 @@
HAS_SPATIAL_DB, mysql, oracle, postgis, spatialite, no_oracle, no_spatialite
)
from django.test import TestCase
-from django.utils.unittest import skipUnless
if HAS_GEOS and HAS_SPATIAL_DB:
from django.contrib.gis.geos import GEOSGeometry, LineString
@@ -2,13 +2,13 @@
import os
import re
+from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import postgis
from django.test import TestCase
from django.utils._os import upath
-from django.utils.unittest import skipUnless
if HAS_GEOS:
from django.contrib.gis.db.models import Union, Extent3D
@@ -1,9 +1,10 @@
from __future__ import absolute_import
+from unittest import skipUnless
+
from django.test import TestCase
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB
-from django.utils.unittest import skipUnless
if HAS_GEOS and HAS_SPATIAL_DB:
from django.contrib.gis import admin
@@ -1,13 +1,13 @@
from __future__ import absolute_import
+from unittest import skipUnless
from xml.dom import minidom
from django.conf import settings
from django.contrib.sites.models import Site
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.utils.unittest import skipUnless
if HAS_GEOS:
from .models import City
@@ -2,14 +2,14 @@
from __future__ import absolute_import, unicode_literals
from datetime import datetime
+from unittest import skipUnless
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import no_mysql, no_spatialite
from django.contrib.gis.shortcuts import render_to_kmz
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB
from django.db.models import Count, Min
from django.test import TestCase
-from django.utils.unittest import skipUnless
if HAS_GEOS:
from .models import City, PennsylvaniaCity, State, Truth
@@ -1,6 +1,7 @@
from __future__ import absolute_import
from io import BytesIO
+from unittest import skipUnless
from xml.dom import minidom
import zipfile
@@ -9,7 +10,6 @@
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB
from django.contrib.sites.models import Site
from django.test import TestCase
-from django.utils.unittest import skipUnless
if HAS_GEOS:
from .models import City, Country
@@ -1,6 +1,7 @@
from __future__ import absolute_import
import re
+from unittest import skipUnless
from django.db import connection
from django.contrib.gis import gdal
@@ -10,7 +11,6 @@
mysql, oracle, postgis, spatialite)
from django.test import TestCase
from django.utils import six, unittest
-from django.utils.unittest import skipUnless
if HAS_GEOS:
from django.contrib.gis.geos import (fromstr, GEOSGeometry,
@@ -4,14 +4,14 @@
from __future__ import absolute_import
import os
+from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.measure import D
from django.contrib.gis.tests.utils import postgis
from django.test import TestCase
from django.utils._os import upath
-from django.utils.unittest import skipUnless
if HAS_GEOS:
from .models import City, County, Zipcode
@@ -1,13 +1,13 @@
from __future__ import absolute_import
import os
+from unittest import skipUnless
from django.db import connections
from django.test import TestCase
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geometry.test_data import TEST_DATA
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB
-from django.utils.unittest import skipUnless
if HAS_GDAL:
from django.contrib.gis.gdal import Driver
@@ -1,17 +1,17 @@
# coding: utf-8
from __future__ import absolute_import, unicode_literals
-import os
from copy import copy
from decimal import Decimal
+import os
+import unittest
+from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql
from django.db import router
from django.conf import settings
from django.test import TestCase
-from django.utils import unittest
-from django.utils.unittest import skipUnless
from django.utils._os import upath
if HAS_GDAL:
@@ -1,9 +1,10 @@
from __future__ import absolute_import
+from unittest import skipUnless
+
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql, oracle, no_mysql, no_oracle, no_spatialite
from django.test import TestCase
-from django.utils.unittest import skipUnless
if HAS_GEOS:
from django.contrib.gis.db.models import Collect, Count, Extent, F, Union
Oops, something went wrong.

0 comments on commit cfcf4b3

Please sign in to comment.