diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-07-01 14:22:27 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-07-01 14:29:33 +0200 |
| commit | cfcf4b3605f9653e4e056088d89932b2a0e4281b (patch) | |
| tree | 1eed1ebdb087b26abeddf5245fc723930d14d847 /tests/template_tests | |
| parent | 7f264e02f4480c49d1440be882416a10951c2165 (diff) | |
Stopped using django.utils.unittest in the test suite.
Refs #20680.
Diffstat (limited to 'tests/template_tests')
| -rw-r--r-- | tests/template_tests/loaders.py | 7 | ||||
| -rw-r--r-- | tests/template_tests/test_callables.py | 3 | ||||
| -rw-r--r-- | tests/template_tests/test_context.py | 4 | ||||
| -rw-r--r-- | tests/template_tests/test_custom.py | 3 | ||||
| -rw-r--r-- | tests/template_tests/test_nodelist.py | 3 | ||||
| -rw-r--r-- | tests/template_tests/test_parser.py | 3 | ||||
| -rw-r--r-- | tests/template_tests/test_smartif.py | 3 | ||||
| -rw-r--r-- | tests/template_tests/test_unicode.py | 3 | ||||
| -rw-r--r-- | tests/template_tests/tests.py | 2 |
9 files changed, 20 insertions, 11 deletions
diff --git a/tests/template_tests/loaders.py b/tests/template_tests/loaders.py index b77965203f..497b422e7f 100644 --- a/tests/template_tests/loaders.py +++ b/tests/template_tests/loaders.py @@ -9,15 +9,16 @@ from django.conf import settings if __name__ == '__main__': settings.configure() -import sys -import pkg_resources import imp import os.path +import pkg_resources +import sys +import unittest from django.template import TemplateDoesNotExist, Context from django.template.loaders.eggs import Loader as EggLoader from django.template import loader -from django.utils import unittest, six +from django.utils import six from django.utils._os import upath from django.utils.six import StringIO diff --git a/tests/template_tests/test_callables.py b/tests/template_tests/test_callables.py index 882a8c6e06..718b7740d9 100644 --- a/tests/template_tests/test_callables.py +++ b/tests/template_tests/test_callables.py @@ -1,7 +1,8 @@ from __future__ import unicode_literals +from unittest import TestCase + from django import template -from django.utils.unittest import TestCase class CallableVariablesTests(TestCase): diff --git a/tests/template_tests/test_context.py b/tests/template_tests/test_context.py index 05c1dd57b9..224b94d060 100644 --- a/tests/template_tests/test_context.py +++ b/tests/template_tests/test_context.py @@ -1,6 +1,8 @@ # coding: utf-8 + +from unittest import TestCase + from django.template import Context -from django.utils.unittest import TestCase class ContextTests(TestCase): diff --git a/tests/template_tests/test_custom.py b/tests/template_tests/test_custom.py index 4aea08237d..e941bc223e 100644 --- a/tests/template_tests/test_custom.py +++ b/tests/template_tests/test_custom.py @@ -1,8 +1,9 @@ from __future__ import absolute_import, unicode_literals +from unittest import TestCase + from django import template from django.utils import six -from django.utils.unittest import TestCase from .templatetags import custom diff --git a/tests/template_tests/test_nodelist.py b/tests/template_tests/test_nodelist.py index 97aa5af6a7..755c0c3bea 100644 --- a/tests/template_tests/test_nodelist.py +++ b/tests/template_tests/test_nodelist.py @@ -1,6 +1,7 @@ +from unittest import TestCase + from django.template import VariableNode, Context from django.template.loader import get_template_from_string -from django.utils.unittest import TestCase from django.test.utils import override_settings class NodelistTest(TestCase): diff --git a/tests/template_tests/test_parser.py b/tests/template_tests/test_parser.py index 9422da80d7..e626bfd34f 100644 --- a/tests/template_tests/test_parser.py +++ b/tests/template_tests/test_parser.py @@ -3,10 +3,11 @@ Testing some internals of the template processing. These are *not* examples to b """ from __future__ import unicode_literals +from unittest import TestCase + from django.template import (TokenParser, FilterExpression, Parser, Variable, Template, TemplateSyntaxError) from django.test.utils import override_settings -from django.utils.unittest import TestCase from django.utils import six diff --git a/tests/template_tests/test_smartif.py b/tests/template_tests/test_smartif.py index 3a705ca663..4345e04126 100644 --- a/tests/template_tests/test_smartif.py +++ b/tests/template_tests/test_smartif.py @@ -1,5 +1,6 @@ +import unittest + from django.template.smartif import IfParser -from django.utils import unittest class SmartIfTests(unittest.TestCase): diff --git a/tests/template_tests/test_unicode.py b/tests/template_tests/test_unicode.py index 7cb2a28d15..773dd543b7 100644 --- a/tests/template_tests/test_unicode.py +++ b/tests/template_tests/test_unicode.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals +from unittest import TestCase + from django.template import Template, TemplateEncodingError, Context from django.utils.safestring import SafeData from django.utils import six -from django.utils.unittest import TestCase class UnicodeTests(TestCase): diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py index ff31795fff..6b8a106623 100644 --- a/tests/template_tests/tests.py +++ b/tests/template_tests/tests.py @@ -13,6 +13,7 @@ import time import os import sys import traceback +import unittest try: from urllib.parse import urljoin except ImportError: # Python 2 @@ -27,7 +28,6 @@ from django.template.loaders import app_directories, filesystem, cached from django.test import RequestFactory, TestCase from django.test.utils import (setup_test_template_loader, restore_template_loaders, override_settings) -from django.utils import unittest from django.utils.encoding import python_2_unicode_compatible from django.utils.formats import date_format from django.utils._os import upath |
