16 lines
561 B
Python
16 lines
561 B
Python
|
|
"""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."""
|
||
|
|
with patch("main.SIDECAR_URL", "http://localhost:8081"), \
|
||
|
|
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
|