summaryrefslogtreecommitdiff
path: root/tests/template_tests/syntax_tests/test_if.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/template_tests/syntax_tests/test_if.py')
-rw-r--r--tests/template_tests/syntax_tests/test_if.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/template_tests/syntax_tests/test_if.py b/tests/template_tests/syntax_tests/test_if.py
index 5ea57bf489..711f871af9 100644
--- a/tests/template_tests/syntax_tests/test_if.py
+++ b/tests/template_tests/syntax_tests/test_if.py
@@ -1,4 +1,5 @@
from django.template import TemplateSyntaxError
+from django.template.defaulttags import IfNode
from django.test import SimpleTestCase
from ..utils import TestObj, setup
@@ -599,3 +600,9 @@ class IfTagTests(SimpleTestCase):
def test_if_is_not_both_variables_missing(self):
output = self.engine.render_to_string('template', {})
self.assertEqual(output, 'no')
+
+
+class IfNodeTests(SimpleTestCase):
+ def test_repr(self):
+ node = IfNode(conditions_nodelists=[])
+ self.assertEqual(repr(node), '<IfNode>')