From 0111167c17dba8a642db2bcaa98eaea6878859b9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 10:05:21 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20[pre-commit.ci]=20Auto=20format?= =?UTF-8?q?=20from=20pre-commit.com=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_custom_middleware_exception.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_custom_middleware_exception.py b/tests/test_custom_middleware_exception.py index 9b4a7a9a99ceb..04cc350bc039a 100644 --- a/tests/test_custom_middleware_exception.py +++ b/tests/test_custom_middleware_exception.py @@ -11,7 +11,7 @@ class ContentSizeLimitMiddleware: - """ Content size limiting middleware for ASGI applications + """Content size limiting middleware for ASGI applications Args: app (ASGI application): ASGI application max_content_size (optional): the maximum content size allowed in bytes, None for no limit @@ -60,14 +60,14 @@ def run_middleware(file: UploadFile = File(..., description="Big File")): app.include_router(router) -app.add_middleware(ContentSizeLimitMiddleware, max_content_size=2 ** 8) +app.add_middleware(ContentSizeLimitMiddleware, max_content_size=2**8) client = TestClient(app) def test_custom_middleware_exception(tmpdir): - default_pydantic_max_size = 2 ** 16 + default_pydantic_max_size = 2**16 path = os.path.join(tmpdir, "test.txt") with open(path, "wb") as file: file.write(b"x" * (default_pydantic_max_size + 1))