Skip to content

Commit

Permalink
fix: Broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Sunglasses authored Sep 21, 2024
1 parent da33350 commit 7075126
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,11 @@ def test_post_file_route() -> None:
def test_post_file_route_failure() -> None:
response = client.post("/file")
assert response.status_code == 422 # Unprocessable Entity
assert response.json() == {
"detail": [
{
"type": "missing",
"loc": ["body", "file"],
"msg": "Field required",
"input": None,
"url": "https://errors.pydantic.dev/2.5/v/missing",
}
]
}
error_detail = response.json().get("detail", [])
assert error_detail
assert error_detail[0]["loc"] == ["body", "file"]
assert "Field required" in error_detail[0]["msg"]



def test_post_file_route_size_limit() -> None:
Expand Down

0 comments on commit 7075126

Please sign in to comment.