Home / Function/ test_add_template_filter_with_name_and_template() — flask Function Reference

test_add_template_filter_with_name_and_template() — flask Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  ae3b04be_b371_2d34_9572_f7ea94bebfd3["test_add_template_filter_with_name_and_template()"]
  4366a441_d387_52f9_ec8d_1c41c71c00a8["test_blueprints.py"]
  ae3b04be_b371_2d34_9572_f7ea94bebfd3 -->|defined in| 4366a441_d387_52f9_ec8d_1c41c71c00a8
  style ae3b04be_b371_2d34_9572_f7ea94bebfd3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_blueprints.py lines 505–519

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

    def my_reverse(s):
        return s[::-1]

    bp.add_app_template_filter(my_reverse, "super_reverse")
    app.register_blueprint(bp, url_prefix="/py")

    @app.route("/")
    def index():
        return flask.render_template("template_filter.html", value="abcd")

    rv = client.get("/")
    assert rv.data == b"dcba"

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free