Home / Function/ test_request_processing() — flask Function Reference

test_request_processing() — flask Function Reference

Architecture documentation for the test_request_processing() function in test_basic.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  049718a7_40a8_3f0b_c44d_d506d56dd0ce["test_request_processing()"]
  85bc4fb5_d1d7_a135_020d_69e052c12c0f["test_basic.py"]
  049718a7_40a8_3f0b_c44d_d506d56dd0ce -->|defined in| 85bc4fb5_d1d7_a135_020d_69e052c12c0f
  6ea1611d_2801_3cb5_a5b9_5b6403cc0537["index()"]
  049718a7_40a8_3f0b_c44d_d506d56dd0ce -->|calls| 6ea1611d_2801_3cb5_a5b9_5b6403cc0537
  style 049718a7_40a8_3f0b_c44d_d506d56dd0ce fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_basic.py lines 688–710

def test_request_processing(app, client):
    evts = []

    @app.before_request
    def before_request():
        evts.append("before")

    @app.after_request
    def after_request(response):
        response.data += b"|after"
        evts.append("after")
        return response

    @app.route("/")
    def index():
        assert "before" in evts
        assert "after" not in evts
        return "request"

    assert "after" not in evts
    rv = client.get("/").data
    assert "after" in evts
    assert rv == b"request|after"

Subdomains

Defined In

Calls

Frequently Asked Questions

What does test_request_processing() do?
test_request_processing() is a function in the flask codebase, defined in tests/test_basic.py.
Where is test_request_processing() defined?
test_request_processing() is defined in tests/test_basic.py at line 688.
What does test_request_processing() call?
test_request_processing() 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