summaryrefslogtreecommitdiff
path: root/tests/template_tests
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-11-27 02:41:27 +0200
committerTim Graham <timograham@gmail.com>2014-12-03 14:27:38 -0500
commit560b4207b1490a7d0cbf70cfbeba7daf2082e5be (patch)
tree9656c5e6a5d0de63024bb5ff2291963f4f236100 /tests/template_tests
parent50c1d8f24b0d04c813b3dd34720df86446091afa (diff)
Removed redundant numbered parameters from str.format().
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
Diffstat (limited to 'tests/template_tests')
-rw-r--r--tests/template_tests/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py
index 43dac24b92..d58c91f90d 100644
--- a/tests/template_tests/tests.py
+++ b/tests/template_tests/tests.py
@@ -319,12 +319,12 @@ class TemplateRegressionTests(TestCase):
# When the IfChangeNode stores state at 'self' it stays at '3' and skip the last yielded value below.
iter2 = iter([1, 2, 3])
output2 = template.render(Context({'foo': range(3), 'get_value': lambda: next(iter2)}))
- self.assertEqual(output2, '[0,1,2,3]', 'Expected [0,1,2,3] in second parallel template, got {0}'.format(output2))
+ self.assertEqual(output2, '[0,1,2,3]', 'Expected [0,1,2,3] in second parallel template, got {}'.format(output2))
yield 3
gen1 = gen()
output1 = template.render(Context({'foo': range(3), 'get_value': lambda: next(gen1)}))
- self.assertEqual(output1, '[0,1,2,3]', 'Expected [0,1,2,3] in first template, got {0}'.format(output1))
+ self.assertEqual(output1, '[0,1,2,3]', 'Expected [0,1,2,3] in first template, got {}'.format(output1))
def test_cache_regression_20130(self):
t = Template('{% load cache %}{% cache 1 regression_20130 %}foo{% endcache %}')