Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

991 B
Raw Blame
"""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 settings_override():
    """Provide isolated settings containing the test tenant."""
    return get_settings_override()


@pytest.fixture()
def client():
    """Provide a FastAPI TestClient for tests."""
    client = TestClient(app)
    app.dependency_overrides[get_settings] = get_settings_override

    return client