1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Added tests for various __repr__() methods.

This commit is contained in:
Mads Jensen
2017-02-04 11:43:14 +01:00
committed by Tim Graham
parent 2d899ce16b
commit ce69a421f6
6 changed files with 69 additions and 1 deletions

View File

@@ -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>')