From 6add32de2d16ba9ff9bfb17858cacae80e671795 Mon Sep 17 00:00:00 2001 From: Rami Date: Fri, 29 Mar 2024 14:37:45 +0100 Subject: [PATCH] fix: Ok --- text2sql-backend/tests/api/test_settings.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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]]