From 41883c24a5c03f75ff602401003f603b738759fa Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 9 Sep 2007 01:11:24 +0200 Subject: [PATCH] added unittest for the breakage i encountered today --HG-- branch : trunk --- tests/test_filters.py | 6 ++++++ 1 file changed, 6 insertions(+) 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' -- 2.26.2