mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #20130 -- Regression in {% cache %} template tag.
This commit is contained in:
parent
465b01f065
commit
5080311998
2 changed files with 6 additions and 1 deletions
|
@ -441,6 +441,11 @@ class Templates(TestCase):
|
|||
output1 = template.render(Context({'foo': range(3), 'get_value': lambda: next(gen1)}))
|
||||
self.assertEqual(output1, '[0,1,2,3]', 'Expected [0,1,2,3] in first template, got {0}'.format(output1))
|
||||
|
||||
def test_cache_regression_20130(self):
|
||||
t = Template('{% load cache %}{% cache 1 regression_20130 %}foo{% endcache %}')
|
||||
cachenode = t.nodelist[1]
|
||||
self.assertEqual(cachenode.fragment_name, 'regression_20130')
|
||||
|
||||
def test_ifchanged_render_once(self):
|
||||
""" Test for ticket #19890. The content of ifchanged template tag was
|
||||
rendered twice."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue