Function
test_max_content_length
(app: Flask, client: FlaskClient)
Source from the content-addressed store, hash-verified
| 7 | |
| 8 | |
| 9 | def test_max_content_length(app: Flask, client: FlaskClient) -> None: |
| 10 | app.config["MAX_CONTENT_LENGTH"] = 50 |
| 11 | |
| 12 | @app.post("/") |
| 13 | def index(): |
| 14 | request.form["myfile"] |
| 15 | AssertionError() |
| 16 | |
| 17 | @app.errorhandler(413) |
| 18 | def catcher(error): |
| 19 | return "42" |
| 20 | |
| 21 | rv = client.post("/", data={"myfile": "foo" * 50}) |
| 22 | assert rv.data == b"42" |
| 23 | |
| 24 | |
| 25 | def test_limit_config(app: Flask): |
Callers
nothing calls this directly
Tested by
no test coverage detected