1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +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,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>')