summaryrefslogtreecommitdiff
path: root/tests/template_tests/syntax_tests/test_if_equal.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_equal.py
parent2d899ce16bdbef1a015275237f0bfef4045fb6b2 (diff)
Added tests for various __repr__() methods.
Diffstat (limited to 'tests/template_tests/syntax_tests/test_if_equal.py')
-rw-r--r--tests/template_tests/syntax_tests/test_if_equal.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/template_tests/syntax_tests/test_if_equal.py b/tests/template_tests/syntax_tests/test_if_equal.py
index 6124608b08..82ddf557db 100644
--- a/tests/template_tests/syntax_tests/test_if_equal.py
+++ b/tests/template_tests/syntax_tests/test_if_equal.py
@@ -1,3 +1,4 @@
+from django.template.defaulttags import IfEqualNode
from django.test import SimpleTestCase
from ..utils import setup
@@ -215,3 +216,9 @@ class IfNotEqualTagTests(SimpleTestCase):
def test_ifnotequal04(self):
output = self.engine.render_to_string('ifnotequal04', {'a': 1, 'b': 1})
self.assertEqual(output, 'no')
+
+
+class IfEqualTests(SimpleTestCase):
+ def test_repr(self):
+ node = IfEqualNode(var1='a', var2='b', nodelist_true=[], nodelist_false=[], negate=False)
+ self.assertEqual(repr(node), '<IfEqualNode>')