def test_non_cached(self): """ It doesn't cache templates if only arg values are given, instead of arg key,value pairs. """ _template_tag_cache.clear() for i in xrange(2): self.assertEqual(len(_template_tag_cache), 0) self.assertEqual(render_template_tag('firstof', ['foo']), 'foo')
def test_cached(self): _template_tag_cache.clear() for i in xrange(2): self.assertEqual(len(_template_tag_cache), i) self.assertEqual( render_template_tag('firstof', [('arg_name', 'foo')]), 'foo')
def test_cached(self): _template_tag_cache.clear() for i in xrange(2): self.assertEqual(len(_template_tag_cache), i) self.assertEqual(render_template_tag('firstof', [('arg_name', 'foo')]), 'foo')