Protect private API routes and scope agent data
This commit is contained in:
@@ -5,7 +5,6 @@ from uuid import UUID
|
||||
from unittest.mock import patch
|
||||
|
||||
from fastapi import HTTPException
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
# Importing the API initializes its SQLite schema. Keep this test process isolated
|
||||
# from the real local conversation database.
|
||||
@@ -13,12 +12,13 @@ _TEST_DATA_DIR = tempfile.TemporaryDirectory(prefix="sovereignai-api-tests-")
|
||||
os.environ["SOVEREIGNAI_DATA_DIR"] = _TEST_DATA_DIR.name
|
||||
|
||||
from app.main import app
|
||||
from tests.api_client import authenticated_client
|
||||
|
||||
|
||||
class ApiErrorContractTests(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls) -> None:
|
||||
cls.client = TestClient(app)
|
||||
cls.client = authenticated_client(app)
|
||||
|
||||
def test_health_response_has_correlation_id(self) -> None:
|
||||
response = self.client.get("/health")
|
||||
|
||||
Reference in New Issue
Block a user