"""Shared fixtures for the non-browser test suite.""" from __future__ import annotations import pytest from fastapi.testclient import TestClient from mirror.app import create_app from mirror.config import Settings from mirror.registry import Registry @pytest.fixture def settings() -> Settings: return Settings(host="127.0.0.1", port=0, ice_servers=[], max_bitrate_bps=2_000_000) @pytest.fixture def registry() -> Registry: counter = iter(f"p{i}" for i in range(1, 10_000)) return Registry(id_factory=lambda: next(counter)) @pytest.fixture def client(app) -> TestClient: with TestClient(app) as test_client: yield test_client @pytest.fixture def app(settings) -> object: return create_app(settings)