2026-06-15 04:13:36 +03:00
|
|
|
"""Shared fixtures for router tests."""
|
|
|
|
|
import pytest
|
|
|
|
|
from unittest.mock import patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
|
|
|
def patch_router_urls():
|
|
|
|
|
"""Patch router URLs for all tests in this package."""
|
2026-06-15 16:16:47 +03:00
|
|
|
with patch("main.SIDECAR_URL", "http://localhost:8080"), \
|
2026-06-15 04:13:36 +03:00
|
|
|
patch("main.MAIN_PC_BASE", "http://localhost:8080"), \
|
|
|
|
|
patch("main.FALLBACK_SLM_URL", "http://localhost:9999"), \
|
|
|
|
|
patch("main.OPENROUTER_API_KEY", "test-key"), \
|
|
|
|
|
patch("main._circuit_open", False), \
|
|
|
|
|
patch("main._recovery_attempts", 0):
|
|
|
|
|
yield
|