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:
@@ -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>')
|
||||
|
||||
Reference in New Issue
Block a user