mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #27882 -- Allowed {% cache %} to cache indefinitely.
This commit is contained in:
parent
44f9241c48
commit
7a7b331cd5
3 changed files with 23 additions and 6 deletions
|
@ -122,6 +122,17 @@ class CacheTagTests(SimpleTestCase):
|
|||
output = self.engine.render_to_string('cache18')
|
||||
self.assertEqual(output, 'cache18')
|
||||
|
||||
@setup({
|
||||
'first': '{% load cache %}{% cache None fragment19 %}content{% endcache %}',
|
||||
'second': '{% load cache %}{% cache None fragment19 %}not rendered{% endcache %}'
|
||||
})
|
||||
def test_none_timeout(self):
|
||||
"""A timeout of None means "cache forever"."""
|
||||
output = self.engine.render_to_string('first')
|
||||
self.assertEqual(output, 'content')
|
||||
output = self.engine.render_to_string('second')
|
||||
self.assertEqual(output, 'content')
|
||||
|
||||
|
||||
class CacheTests(SimpleTestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue