mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #24121 -- Added __repr__() to Origin and Template.
This commit is contained in:
committed by
Mariusz Felisiak
parent
065832eaec
commit
4f4f770f77
@@ -8,6 +8,17 @@ class TemplateTests(SimpleTestCase):
|
||||
template_string = gettext_lazy('lazy string')
|
||||
self.assertEqual(Template(template_string).render(Context()), template_string)
|
||||
|
||||
def test_repr(self):
|
||||
template = Template(
|
||||
'<html><body>\n'
|
||||
'{% if test %}<h1>{{ varvalue }}</h1>{% endif %}'
|
||||
'</body></html>'
|
||||
)
|
||||
self.assertEqual(
|
||||
repr(template),
|
||||
'<Template template_string="<html><body>{% if t...">',
|
||||
)
|
||||
|
||||
|
||||
class VariableDoesNotExistTests(SimpleTestCase):
|
||||
def test_str(self):
|
||||
|
||||
Reference in New Issue
Block a user