Skip to content

Commit

Permalink
Updated test that tried to verify the exact opposite of the policy th…
Browse files Browse the repository at this point in the history
…at we now'd like to have.
  • Loading branch information
miracle2k committed Mar 10, 2010
1 parent 805b967 commit 14d0375
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ def test_nodes_and_extensions():
def test_filters():
"""Test availability of registered filters.
"""
from coffin.common import env

# Filter registered with a Coffin library is available in Django and Jinja2
assert env.from_string('a{{ "b"|foo }}c').render() == 'a{foo}c'
assert Template('{% load foo_filter %}a{{ "b"|foo }}c').render(Context()) == 'a{foo}c'

# Filter registered with a Django library is not available in Jinja2
# Filter registered with a Django library is also available in Jinja2
Template('{% load foo_filter_django %}{{ "b"|foo_django }}').render(Context())
assert_raises(Jinja2TemplateAssertionError,
env.from_string, 'a{{ "b"|foo_django }}c')
assert env.from_string('a{{ "b"|foo }}c').render() == 'a{foo}c'

# Some filters, while registered with a Coffin library, are only
# available in Jinja2:
Expand Down

0 comments on commit 14d0375

Please sign in to comment.