Skip to content
Myr

added unittest for the breakage i encountered today

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent f5f8ffc · Browse files · 1 file+6 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−0 removed

  • tests:+6 added−0 removed

1 file+6 added−0 removed

modified:tests/test_filters.py+6 added
64 unmodified lines
65GROUPBY = '''{{ [{'foo': 1, 'bar': 2},66 {'foo': 2, 'bar': 3},67 {'foo': 1, 'bar': 1},68 {'foo': 3, 'bar': 4}]|groupby('foo') }}'''69FILTERTAG = '''{% filter upper|replace('FOO', 'foo') %}foobar{% endfilter %}'''70717273def test_capitalize(env):
221 unmodified lines
295 "[{'list': [{'foo': 1, 'bar': 2}, {'foo': 1, 'bar': 1}], "296 "'grouper': 1}, {'list': [{'foo': 2, 'bar': 3}], 'grouper': 2}, "297 "{'list': [{'foo': 3, 'bar': 4}], 'grouper': 3}]"298 )299300301def test_filtertag(env):302 tmpl = env.from_string(FILTERTAG)303 assert tmpl.render() == 'fooBAR'