mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-28 04:39:16 +00:00
27da57aff5
This commit cleans up most of the code related to v1 route that is used only by visio. This is first step before introducing an update to the v2 route.
32 lines
847 B
Python
32 lines
847 B
Python
"""Integration test configuration. Provides shared fixtures."""
|
|
|
|
import pytest
|
|
from fastapi.testclient import TestClient
|
|
from pydantic import SecretStr
|
|
|
|
from summary.core.config import AuthorizedTenant, Settings, get_settings
|
|
from summary.main import app
|
|
|
|
|
|
def get_settings_override():
|
|
"""Return settings for tests."""
|
|
return Settings(
|
|
authorized_tenants=(
|
|
AuthorizedTenant(
|
|
webhook_url="https://example.com/webhook",
|
|
id="test-tenant",
|
|
api_key=SecretStr("test-api-token"),
|
|
webhook_api_key=SecretStr("test-webhook-api-key"),
|
|
),
|
|
),
|
|
)
|
|
|
|
|
|
@pytest.fixture()
|
|
def client():
|
|
"""Provide a FastAPI TestClient for tests."""
|
|
client = TestClient(app)
|
|
app.dependency_overrides[get_settings] = get_settings_override
|
|
|
|
return client
|