(summary) add tests for the task endpoint

Ensure the API correctly validates and accepts the parameters
required to register a task in the queue.
This commit is contained in:
lebaudantoine
2026-03-17 22:24:53 +01:00
committed by aleb_the_flash
parent fce94f38ce
commit a27def119c
2 changed files with 102 additions and 2 deletions
+14 -2
View File
@@ -2,11 +2,23 @@
import pytest
from fastapi.testclient import TestClient
from pydantic import SecretStr
from summary.core.config import Settings, get_settings
from summary.main import app
def get_settings_override():
"""Return settings for tests."""
return Settings(
app_api_token=SecretStr("test-api-token"),
)
@pytest.fixture()
def client():
"""Provide a FastAPI TestClient for integration tests."""
return TestClient(app)
"""Provide a FastAPI TestClient for tests."""
client = TestClient(app)
app.dependency_overrides[get_settings] = get_settings_override
return client