Home / Function/ test_template_filter_with_name() — flask Function Reference

test_template_filter_with_name() — flask Function Reference

Architecture documentation for the test_template_filter_with_name() function in test_blueprints.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  e31db1a3_7db9_3fa2_6408_9704673667ff["test_template_filter_with_name()"]
  d1099772_a45a_a9fc_1646_c865e8d6a975["test_blueprints.py"]
  e31db1a3_7db9_3fa2_6408_9704673667ff -->|defined in| d1099772_a45a_a9fc_1646_c865e8d6a975
  style e31db1a3_7db9_3fa2_6408_9704673667ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_blueprints.py lines 412–422

def test_template_filter_with_name(app):
    bp = flask.Blueprint("bp", __name__)

    @bp.app_template_filter("strrev")
    def my_reverse(s):
        return s[::-1]

    app.register_blueprint(bp, url_prefix="/py")
    assert "strrev" in app.jinja_env.filters.keys()
    assert app.jinja_env.filters["strrev"] == my_reverse
    assert app.jinja_env.filters["strrev"]("abcd") == "dcba"

Subdomains

Frequently Asked Questions

What does test_template_filter_with_name() do?
test_template_filter_with_name() is a function in the flask codebase, defined in tests/test_blueprints.py.
Where is test_template_filter_with_name() defined?
test_template_filter_with_name() is defined in tests/test_blueprints.py at line 412.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free