mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #29617 -- Fixed Template crash if template_string is lazy.
Regression in 3a148f958d.
This commit is contained in:
committed by
Tim Graham
parent
4198445afc
commit
9f3b9ffd51
@@ -1,5 +1,12 @@
|
||||
from django.template.base import Variable, VariableDoesNotExist
|
||||
from django.template import Context, Template, Variable, VariableDoesNotExist
|
||||
from django.test import SimpleTestCase
|
||||
from django.utils.translation import gettext_lazy
|
||||
|
||||
|
||||
class TemplateTests(SimpleTestCase):
|
||||
def test_lazy_template_string(self):
|
||||
template_string = gettext_lazy('lazy string')
|
||||
self.assertEqual(Template(template_string).render(Context()), template_string)
|
||||
|
||||
|
||||
class VariableDoesNotExistTests(SimpleTestCase):
|
||||
|
||||
Reference in New Issue
Block a user