diff --git a/text2sql-backend/tests/api/test_settings.py b/text2sql-backend/tests/api/test_settings.py index 10d180e8..8b32a607 100644 --- a/text2sql-backend/tests/api/test_settings.py +++ b/text2sql-backend/tests/api/test_settings.py @@ -6,6 +6,8 @@ import pytest_asyncio from fastapi.testclient import TestClient +from dataline.repositories.base import NotFoundError + logger = logging.getLogger(__name__) @@ -95,8 +97,9 @@ async def test_get_info(client: TestClient, user_info: dict[str, str]) -> None: @pytest.mark.asyncio async def test_get_info_not_found(client: TestClient) -> None: - response = client.get("/settings/info") - assert response.status_code == 404 + with pytest.raises(NotFoundError): + response = client.get("/settings/info") + assert response.status_code == 404 FileTuple = tuple[str, tuple[str, BytesIO, str]]