test_request_dispatching() — flask Function Reference
Architecture documentation for the test_request_dispatching() function in test_basic.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 4ba73190_d20c_802c_ac28_3740d24a5624["test_request_dispatching()"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f["test_basic.py"] 4ba73190_d20c_802c_ac28_3740d24a5624 -->|defined in| 85bc4fb5_d1d7_a135_020d_69e052c12c0f 6ea1611d_2801_3cb5_a5b9_5b6403cc0537["index()"] 4ba73190_d20c_802c_ac28_3740d24a5624 -->|calls| 6ea1611d_2801_3cb5_a5b9_5b6403cc0537 style 4ba73190_d20c_802c_ac28_3740d24a5624 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_basic.py lines 129–149
def test_request_dispatching(app, client):
@app.route("/")
def index():
return flask.request.method
@app.route("/more", methods=["GET", "POST"])
def more():
return flask.request.method
assert client.get("/").data == b"GET"
rv = client.post("/")
assert rv.status_code == 405
assert sorted(rv.allow) == ["GET", "HEAD", "OPTIONS"]
rv = client.head("/")
assert rv.status_code == 200
assert not rv.data # head truncates
assert client.post("/more").data == b"POST"
assert client.get("/more").data == b"GET"
rv = client.delete("/more")
assert rv.status_code == 405
assert sorted(rv.allow) == ["GET", "HEAD", "OPTIONS", "POST"]
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_request_dispatching() do?
test_request_dispatching() is a function in the flask codebase, defined in tests/test_basic.py.
Where is test_request_dispatching() defined?
test_request_dispatching() is defined in tests/test_basic.py at line 129.
What does test_request_dispatching() call?
test_request_dispatching() calls 1 function(s): index.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free