mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed E128 flake8 warnings in tests/.
This commit is contained in:
@@ -23,8 +23,10 @@ class AutoescapeTagTests(SimpleTestCase):
|
||||
self.assertEqual(output, '<b>hello</b>')
|
||||
|
||||
# Autoescape disabling and enabling nest in a predictable way.
|
||||
@setup({'autoescape-tag04': '{% autoescape off %}'
|
||||
'{{ first }} {% autoescape on %}{{ first }}{% endautoescape %}{% endautoescape %}'})
|
||||
@setup({
|
||||
'autoescape-tag04':
|
||||
'{% autoescape off %}{{ first }} {% autoescape on %}{{ first }}{% endautoescape %}{% endautoescape %}'
|
||||
})
|
||||
def test_autoescape_tag04(self):
|
||||
output = self.engine.render_to_string('autoescape-tag04', {'first': '<a>'})
|
||||
self.assertEqual(output, '<a> <a>')
|
||||
@@ -46,8 +48,10 @@ class AutoescapeTagTests(SimpleTestCase):
|
||||
output = self.engine.render_to_string('autoescape-tag07', {'first': mark_safe('<b>Apple</b>')})
|
||||
self.assertEqual(output, '<b>Apple</b>')
|
||||
|
||||
@setup({'autoescape-tag08': r'{% autoescape on %}'
|
||||
r'{{ var|default_if_none:" endquote\" hah" }}{% endautoescape %}'})
|
||||
@setup({
|
||||
'autoescape-tag08':
|
||||
r'{% autoescape on %}{{ var|default_if_none:" endquote\" hah" }}{% endautoescape %}'
|
||||
})
|
||||
def test_autoescape_tag08(self):
|
||||
"""
|
||||
Literal string arguments to filters, if used in the result, are safe.
|
||||
|
||||
Reference in New Issue
Block a user