Skip to content

Commit

Permalink
fix: fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Dec 5, 2023
1 parent 4e5bdbc commit ce58a4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1256,14 +1256,14 @@ def test_predict_lang(client, mocker):
def test_predict_lang_http_error(client, mocker):
mocker.patch(
"robotoff.app.api.predict_lang",
side_effect=requests.exceptions.ConnectionError(),
side_effect=requests.exceptions.ConnectionError("A connection error occurred"),
)
result = client.simulate_get(
"/api/v1/predict/lang", params={"text": "hello", "k": 2}
)
assert result.status_code == 500
assert result.json == {
"description": "Internal Server Error",
"description": "A connection error occurred",
"title": "500 Internal Server Error",
}

Expand Down

0 comments on commit ce58a4e

Please sign in to comment.