diff options
Diffstat (limited to 'tests/template_tests/syntax_tests')
4 files changed, 12 insertions, 4 deletions
diff --git a/tests/template_tests/syntax_tests/test_extends.py b/tests/template_tests/syntax_tests/test_extends.py index 46600cb76c..bc320a2fc2 100644 --- a/tests/template_tests/syntax_tests/test_extends.py +++ b/tests/template_tests/syntax_tests/test_extends.py @@ -251,7 +251,9 @@ class InheritanceTests(SimpleTestCase): """ Inheritance from local context without use of template loader """ - context_template = self.engine.from_string("1{% block first %}_{% endblock %}3{% block second %}_{% endblock %}") + context_template = self.engine.from_string( + "1{% block first %}_{% endblock %}3{% block second %}_{% endblock %}" + ) output = self.engine.render_to_string('inheritance24', {'context_template': context_template}) self.assertEqual(output, '1234') diff --git a/tests/template_tests/syntax_tests/test_for.py b/tests/template_tests/syntax_tests/test_for.py index 32fc5f0e3e..f3d571cff1 100644 --- a/tests/template_tests/syntax_tests/test_for.py +++ b/tests/template_tests/syntax_tests/test_for.py @@ -95,7 +95,9 @@ class ForTagTests(SimpleTestCase): @setup({'for-tag-unpack13': '{% for x,y,z in items %}{{ x }}:{{ y }},{{ z }}/{% endfor %}'}) def test_for_tag_unpack13(self): - output = self.engine.render_to_string('for-tag-unpack13', {'items': (('one', 1, 'carrot'), ('two', 2, 'cheese'))}) + output = self.engine.render_to_string( + 'for-tag-unpack13', {'items': (('one', 1, 'carrot'), ('two', 2, 'cheese'))} + ) if self.engine.string_if_invalid: self.assertEqual(output, 'one:1,carrot/two:2,cheese/') else: diff --git a/tests/template_tests/syntax_tests/test_if_changed.py b/tests/template_tests/syntax_tests/test_if_changed.py index ee67c64218..bf8a95d8a4 100644 --- a/tests/template_tests/syntax_tests/test_if_changed.py +++ b/tests/template_tests/syntax_tests/test_if_changed.py @@ -182,7 +182,9 @@ class IfChangedTests(SimpleTestCase): # 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 {}'.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() diff --git a/tests/template_tests/syntax_tests/test_url.py b/tests/template_tests/syntax_tests/test_url.py index bd1ea885d0..0877a316f1 100644 --- a/tests/template_tests/syntax_tests/test_url.py +++ b/tests/template_tests/syntax_tests/test_url.py @@ -127,7 +127,9 @@ class UrlTagTests(SimpleTestCase): @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url19': '{% url named_url client.id %}'}) def test_url19(self): - output = self.engine.render_to_string('url19', {'client': {'id': 1}, 'named_url': 'template_tests.views.client'}) + output = self.engine.render_to_string( + 'url19', {'client': {'id': 1}, 'named_url': 'template_tests.views.client'} + ) self.assertEqual(output, '/client/1/') @setup({'url20': '{% url url_name_in_var client.id %}'}) |
