Skip to content

Commit

Permalink
Uncomment tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex committed Nov 28, 2023
1 parent 054bdcd commit f151586
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions tests/middleware/test_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,18 @@ def test_multiple_middleware_on_starlette(
)
client = test_client_factory(app)

# response = client.post("/outer", content="X" * 1025)
# assert response.status_code == 413
# assert response.text == "Content Too Large"
response = client.post("/outer", content="X" * 1024)
assert response.status_code == 200
assert response.text == "X" * 1024

# response = client.post("/outer", content="X" * 1025)
# assert response.status_code == 413
# assert response.text == "Content Too Large"
response = client.post("/outer", content="X" * 1025)
assert response.status_code == 413
assert response.text == "Content Too Large"

response = client.post("/inner", content="X" * 1025)
response = client.post("/inner", content="X" * 2048)
assert response.status_code == 200
assert response.text == "X" * 1025
assert response.text == "X" * 2048

response = client.post("/inner", content="X" * 2049)
assert response.status_code == 413
assert response.text == "Content Too Large"

0 comments on commit f151586

Please sign in to comment.