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,3 +1,6 @@
from django.template import NodeList
from django.template.base import Node
from django.template.loader_tags import ExtendsNode
from django.test import SimpleTestCase
from ..utils import setup
@@ -396,3 +399,13 @@ class InheritanceTests(SimpleTestCase):
"""
output = self.engine.render_to_string('inheritance42')
self.assertEqual(output, '1234')
class ExtendsNodeTests(SimpleTestCase):
def test_extends_node_repr(self):
extends_node = ExtendsNode(
nodelist=NodeList([]),
parent_name=Node(),
template_dirs=[],
)
self.assertEqual(repr(extends_node), '<ExtendsNode: extends None>')