summaryrefslogtreecommitdiff
path: root/tests/template_tests/syntax_tests/test_if.py
diff options
context:
space:
mode:
authorMads Jensen <mje@inducks.org>2017-02-04 11:43:14 +0100
committerTim Graham <timograham@gmail.com>2017-02-04 11:29:39 -0500
commitce69a421f6122efa7d14cc33a983553dd39b844c (patch)
tree478c1217ac88e3e91c77801f2d7a8c71582b4b83 /tests/template_tests/syntax_tests/test_if.py
parent2d899ce16bdbef1a015275237f0bfef4045fb6b2 (diff)
Added tests for various __repr__() methods.
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>')