Home / Function/ test_error_handling_processing() — flask Function Reference

test_error_handling_processing() — flask Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  5bb8efc9_22e3_7d74_4452_41f8ab338b0c["test_error_handling_processing()"]
  85bc4fb5_d1d7_a135_020d_69e052c12c0f["test_basic.py"]
  5bb8efc9_22e3_7d74_4452_41f8ab338b0c -->|defined in| 85bc4fb5_d1d7_a135_020d_69e052c12c0f
  style 5bb8efc9_22e3_7d74_4452_41f8ab338b0c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_basic.py lines 905–923

def test_error_handling_processing(app, client):
    app.testing = False

    @app.errorhandler(500)
    def internal_server_error(e):
        return "internal server error", 500

    @app.route("/")
    def broken_func():
        raise ZeroDivisionError

    @app.after_request
    def after_request(resp):
        resp.mimetype = "text/x-special"
        return resp

    resp = client.get("/")
    assert resp.mimetype == "text/x-special"
    assert resp.data == b"internal server error"

Subdomains

Defined In

Frequently Asked Questions

What does test_error_handling_processing() do?
test_error_handling_processing() is a function in the flask codebase, defined in tests/test_basic.py.
Where is test_error_handling_processing() defined?
test_error_handling_processing() is defined in tests/test_basic.py at line 905.

Analyze Your Own Codebase

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

Try Supermodel Free