mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Refs #25236 -- Removed {% ifequal %} and {% ifnotequal %} template tags per deprecation timeline.
This commit is contained in:
parent
2dd6a83d2d
commit
e7208f13c0
6 changed files with 4 additions and 362 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue