summaryrefslogtreecommitdiff
path: root/tests/template_tests/syntax_tests/test_autoescape.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2020-05-02 18:04:51 -0700
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-11 09:07:33 +0200
commit72a170b4c3c4c2db8192bb1a6424bcc8eb533973 (patch)
treeba027dc00dc31cd0e2e8869e45eed35162bf1e98 /tests/template_tests/syntax_tests/test_autoescape.py
parentd8cb8fdf40b92961a62effbc9231583901e258b5 (diff)
Fixed #25236 -- Deprecated {% ifequal %} and {% ifnotequal %} template tags.
The {% if %} tag provides all features of these tags. Since Django 1.2 (May 17, 2010), the docs have hinted that {% ifequal %} and {% ifnotequal %} will be deprecated in a future Django version. Time to make it official.
Diffstat (limited to 'tests/template_tests/syntax_tests/test_autoescape.py')
-rw-r--r--tests/template_tests/syntax_tests/test_autoescape.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/template_tests/syntax_tests/test_autoescape.py b/tests/template_tests/syntax_tests/test_autoescape.py
index e684bc94bd..84af2baf5f 100644
--- a/tests/template_tests/syntax_tests/test_autoescape.py
+++ b/tests/template_tests/syntax_tests/test_autoescape.py
@@ -1,5 +1,6 @@
from django.template import TemplateSyntaxError
-from django.test import SimpleTestCase
+from django.test import SimpleTestCase, ignore_warnings
+from django.utils.deprecation import RemovedInDjango40Warning
from django.utils.safestring import mark_safe
from ..utils import SafeClass, UnsafeClass, setup
@@ -81,6 +82,7 @@ class AutoescapeTagTests(SimpleTestCase):
with self.assertRaises(TemplateSyntaxError):
self.engine.render_to_string('autoescape-filtertag01', {'first': '<a>'})
+ @ignore_warnings(category=RemovedInDjango40Warning)
@setup({'autoescape-ifequal01': '{% ifequal var "this & that" %}yes{% endifequal %}'})
def test_autoescape_ifequal01(self):
"""