diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/template_tests/syntax_tests/test_cache.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/template_tests/syntax_tests/test_cache.py b/tests/template_tests/syntax_tests/test_cache.py index 7dec02eb10..6a59cb3c75 100644 --- a/tests/template_tests/syntax_tests/test_cache.py +++ b/tests/template_tests/syntax_tests/test_cache.py @@ -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): |
