Home / Function/ test_manual_context_binding() — flask Function Reference

test_manual_context_binding() — flask Function Reference

Architecture documentation for the test_manual_context_binding() function in test_reqctx.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  9802a062_2af9_e76e_83ca_8b58859d59a4["test_manual_context_binding()"]
  aea65cbf_db83_bd4f_d83f_1a35ae104254["test_reqctx.py"]
  9802a062_2af9_e76e_83ca_8b58859d59a4 -->|defined in| aea65cbf_db83_bd4f_d83f_1a35ae104254
  style 9802a062_2af9_e76e_83ca_8b58859d59a4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_reqctx.py lines 135–145

def test_manual_context_binding(app):
    @app.route("/")
    def index():
        return f"Hello {flask.request.args['name']}!"

    ctx = app.test_request_context("/?name=World")
    ctx.push()
    assert index() == "Hello World!"
    ctx.pop()
    with pytest.raises(RuntimeError):
        index()

Subdomains

Frequently Asked Questions

What does test_manual_context_binding() do?
test_manual_context_binding() is a function in the flask codebase, defined in tests/test_reqctx.py.
Where is test_manual_context_binding() defined?
test_manual_context_binding() is defined in tests/test_reqctx.py at line 135.

Analyze Your Own Codebase

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

Try Supermodel Free