Refs #25236 -- Removed {% ifequal %} and {% ifnotequal %} template tags per deprecation timeline.

This commit is contained in:
Mariusz Felisiak 2021-01-14 10:14:57 +01:00
parent 2dd6a83d2d
commit e7208f13c0
6 changed files with 4 additions and 362 deletions

View file

@ -1,7 +1,6 @@
from django.template import Context, Engine
from django.template.base import TextNode, VariableNode
from django.test import SimpleTestCase, ignore_warnings
from django.utils.deprecation import RemovedInDjango40Warning
from django.test import SimpleTestCase
class NodelistTest(SimpleTestCase):
@ -21,12 +20,6 @@ class NodelistTest(SimpleTestCase):
vars = template.nodelist.get_nodes_by_type(VariableNode)
self.assertEqual(len(vars), 1)
@ignore_warnings(category=RemovedInDjango40Warning)
def test_ifequal(self):
template = self.engine.from_string('{% ifequal x y %}{{ a }}{% endifequal %}')
vars = template.nodelist.get_nodes_by_type(VariableNode)
self.assertEqual(len(vars), 1)
def test_ifchanged(self):
template = self.engine.from_string('{% ifchanged x %}{{ a }}{% endifchanged %}')
vars = template.nodelist.get_nodes_by_type(VariableNode)