diff options
Diffstat (limited to 'tests/template_tests/filter_tests/test_force_escape.py')
-rw-r--r-- | tests/template_tests/filter_tests/test_force_escape.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/template_tests/filter_tests/test_force_escape.py b/tests/template_tests/filter_tests/test_force_escape.py index 875ecb0ad9..f163f2cd75 100644 --- a/tests/template_tests/filter_tests/test_force_escape.py +++ b/tests/template_tests/filter_tests/test_force_escape.py @@ -2,7 +2,8 @@ from __future__ import unicode_literals from django.template.defaultfilters import force_escape -from django.test import SimpleTestCase +from django.test import SimpleTestCase, ignore_warnings +from django.utils.deprecation import RemovedInDjango20Warning from django.utils.safestring import SafeData from ..utils import setup @@ -35,7 +36,8 @@ class ForceEscapeTests(SimpleTestCase): self.assertEqual(output, "x&y") # Because the result of force_escape is "safe", an additional - # escape filter has no effect. + # escape filter has no effect (to be changed in Django 2.0). + @ignore_warnings(category=RemovedInDjango20Warning) @setup({'force-escape05': '{% autoescape off %}{{ a|force_escape|escape }}{% endautoescape %}'}) def test_force_escape05(self): output = self.engine.render_to_string('force-escape05', {"a": "x&y"}) @@ -46,11 +48,13 @@ class ForceEscapeTests(SimpleTestCase): output = self.engine.render_to_string('force-escape06', {"a": "x&y"}) self.assertEqual(output, "x&y") + @ignore_warnings(category=RemovedInDjango20Warning) @setup({'force-escape07': '{% autoescape off %}{{ a|escape|force_escape }}{% endautoescape %}'}) def test_force_escape07(self): output = self.engine.render_to_string('force-escape07', {"a": "x&y"}) self.assertEqual(output, "x&y") + @ignore_warnings(category=RemovedInDjango20Warning) @setup({'force-escape08': '{{ a|escape|force_escape }}'}) def test_force_escape08(self): output = self.engine.render_to_string('force-escape08', {"a": "x&y"}) |