diff --git a/tests/test_openapi.py b/tests/test_openapi.py index 76f33695f..d7f347809 100644 --- a/tests/test_openapi.py +++ b/tests/test_openapi.py @@ -83,6 +83,15 @@ def test_openapi_suggest_novocab(app_client): assert req.status_code == 503 +def test_openapi_suggest_emptybody(app_client): + data = {} + req = app_client.post( + "http://localhost:8000/v1/projects/dummy-fi/suggest", data=data + ) + assert req.status_code == 400 + assert req.json()["detail"] == "RequestBody is required" + + def test_openapi_suggest_batch(app_client): data = {"documents": [{"text": "A quick brown fox jumped over the lazy dog."}] * 32} req = app_client.post(