summaryrefslogtreecommitdiff
path: root/tests/template_tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-01-07 12:11:46 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-18 21:33:28 +0100
commit2b281cc35ed9d997614ca3c416928d7fabfef1ad (patch)
treed3e73cf44b15139aa9f1f53e398942ba64f5e190 /tests/template_tests
parent7b2f2e74adb36a4334e83130f6abc2f79d395235 (diff)
Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
Diffstat (limited to 'tests/template_tests')
-rw-r--r--tests/template_tests/syntax_tests/test_static.py3
-rw-r--r--tests/template_tests/templatetags/custom.py3
-rw-r--r--tests/template_tests/templatetags/inclusion.py3
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)