From: Armin Ronacher Date: Sat, 8 Sep 2007 23:11:24 +0000 (+0200) Subject: added unittest for the breakage i encountered today X-Git-Tag: 2.0rc1~273 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=41883c24a5c03f75ff602401003f603b738759fa;p=jinja2.git added unittest for the breakage i encountered today --HG-- branch : trunk --- diff --git a/tests/test_filters.py b/tests/test_filters.py index a3581ea..cc16194 100644 --- a/tests/test_filters.py +++ b/tests/test_filters.py @@ -66,6 +66,7 @@ GROUPBY = '''{{ [{'foo': 1, 'bar': 2}, {'foo': 2, 'bar': 3}, {'foo': 1, 'bar': 1}, {'foo': 3, 'bar': 4}]|groupby('foo') }}''' +FILTERTAG = '''{% filter upper|replace('FOO', 'foo') %}foobar{% endfilter %}''' @@ -295,3 +296,8 @@ def test_groupby(env): "'grouper': 1}, {'list': [{'foo': 2, 'bar': 3}], 'grouper': 2}, " "{'list': [{'foo': 3, 'bar': 4}], 'grouper': 3}]" ) + + +def test_filtertag(env): + tmpl = env.from_string(FILTERTAG) + assert tmpl.render() == 'fooBAR'