diff options
Diffstat (limited to 'tests/template_tests')
| -rw-r--r-- | tests/template_tests/syntax_tests/test_static.py | 3 | ||||
| -rw-r--r-- | tests/template_tests/templatetags/custom.py | 3 | ||||
| -rw-r--r-- | tests/template_tests/templatetags/inclusion.py | 3 |
3 files changed, 4 insertions, 5 deletions
diff --git a/tests/template_tests/syntax_tests/test_static.py b/tests/template_tests/syntax_tests/test_static.py index deb0ce6c78..345f943caf 100644 --- a/tests/template_tests/syntax_tests/test_static.py +++ b/tests/template_tests/syntax_tests/test_static.py @@ -1,6 +1,7 @@ +from urllib.parse import urljoin + from django.conf import settings from django.test import SimpleTestCase, override_settings -from django.utils.six.moves.urllib.parse import urljoin from ..utils import setup diff --git a/tests/template_tests/templatetags/custom.py b/tests/template_tests/templatetags/custom.py index 363e7094ce..485f49a82d 100644 --- a/tests/template_tests/templatetags/custom.py +++ b/tests/template_tests/templatetags/custom.py @@ -2,7 +2,6 @@ import operator from django import template from django.template.defaultfilters import stringfilter -from django.utils import six from django.utils.html import escape, format_html register = template.Library() @@ -114,7 +113,7 @@ simple_only_unlimited_args.anything = "Expected simple_only_unlimited_args __dic def simple_unlimited_args_kwargs(one, two='hi', *args, **kwargs): """Expected simple_unlimited_args_kwargs __doc__""" # Sort the dictionary by key to guarantee the order for testing. - sorted_kwarg = sorted(six.iteritems(kwargs), key=operator.itemgetter(0)) + sorted_kwarg = sorted(kwargs.items(), key=operator.itemgetter(0)) return "simple_unlimited_args_kwargs - Expected result: %s / %s" % ( ', '.join(str(arg) for arg in [one, two] + list(args)), ', '.join('%s=%s' % (k, v) for (k, v) in sorted_kwarg) diff --git a/tests/template_tests/templatetags/inclusion.py b/tests/template_tests/templatetags/inclusion.py index 745dd7ffae..60f654ec00 100644 --- a/tests/template_tests/templatetags/inclusion.py +++ b/tests/template_tests/templatetags/inclusion.py @@ -1,7 +1,6 @@ import operator from django.template import Engine, Library -from django.utils import six engine = Engine(app_dirs=True) register = Library() @@ -215,7 +214,7 @@ inclusion_tag_use_l10n.anything = "Expected inclusion_tag_use_l10n __dict__" def inclusion_unlimited_args_kwargs(one, two='hi', *args, **kwargs): """Expected inclusion_unlimited_args_kwargs __doc__""" # Sort the dictionary by key to guarantee the order for testing. - sorted_kwarg = sorted(six.iteritems(kwargs), key=operator.itemgetter(0)) + sorted_kwarg = sorted(kwargs.items(), key=operator.itemgetter(0)) return {"result": "inclusion_unlimited_args_kwargs - Expected result: %s / %s" % ( ', '.join(str(arg) for arg in [one, two] + list(args)), ', '.join('%s=%s' % (k, v) for (k, v) in sorted_kwarg) |
