- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for test_custom_middleware_exception (0.11 sec)
-
tests/test_custom_middleware_exception.py
return {"message": "OK"} app.include_router(router) app.add_middleware(ContentSizeLimitMiddleware, max_content_size=2**8) client = TestClient(app) def test_custom_middleware_exception(tmp_path: Path): default_pydantic_max_size = 2**16 path = tmp_path / "test.txt" path.write_bytes(b"x" * (default_pydantic_max_size + 1)) with client: with open(path, "rb") as file:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 25 21:44:40 UTC 2022 - 2.8K bytes - Viewed (0)