Skip to content

Commit

Permalink
馃帹 [pre-commit.ci] Auto format from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Aug 25, 2022
1 parent 2adcc65 commit 0111167
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_custom_middleware_exception.py
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 0111167

Please sign in to comment.