Home / Function/ test_add_template_test_with_name_and_template() — flask Function Reference

test_add_template_test_with_name_and_template() — flask Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/test_blueprints.py lines 665–679

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

    def is_boolean(value):
        return isinstance(value, bool)

    bp.add_app_template_test(is_boolean, "boolean")
    app.register_blueprint(bp, url_prefix="/py")

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

    rv = client.get("/")
    assert b"Success!" in rv.data

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free