test_max_content_length() — flask Function Reference
Architecture documentation for the test_max_content_length() function in test_request.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 23e20330_2d90_2270_aefa_b7b9a1d52347["test_max_content_length()"] 1905b6e1_8d46_0e59_4505_e8c353e23e05["test_request.py"] 23e20330_2d90_2270_aefa_b7b9a1d52347 -->|defined in| 1905b6e1_8d46_0e59_4505_e8c353e23e05 style 23e20330_2d90_2270_aefa_b7b9a1d52347 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_request.py lines 9–22
def test_max_content_length(app: Flask, client: FlaskClient) -> None:
app.config["MAX_CONTENT_LENGTH"] = 50
@app.post("/")
def index():
request.form["myfile"]
AssertionError()
@app.errorhandler(413)
def catcher(error):
return "42"
rv = client.post("/", data={"myfile": "foo" * 50})
assert rv.data == b"42"
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_max_content_length() do?
test_max_content_length() is a function in the flask codebase, defined in tests/test_request.py.
Where is test_max_content_length() defined?
test_max_content_length() is defined in tests/test_request.py at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free