Skip to content

Commit

Permalink
feat: Updated src/test_main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-nightly[bot] authored Oct 24, 2023
1 parent 9fa2b98 commit 858bceb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ def test_predict(mocker: MockerFixture):
mock_image_open.return_value.convert.return_value = Image.new('L', (28, 28))
client = TestClient(app)
response = client.post("/predict/", files={"file": ("filename", io.BytesIO(), "image/png")})
assert response.status_code == 200
assert 'prediction' in response.json()
assert response.status_code == 200, "Expected status code to be 200"
assert 'prediction' in response.json(), "Expected 'prediction' in response"

0 comments on commit 858bceb

Please sign in to comment.