intelligence-router/tests/conftest.py
root 45417068ae fix: change sidecar port from 8081 to 8080
The sidecar is deployed on port 8080 instead of 8081. Update all:
- Default SIDECAR_PORT in sidecar/app.py
- Default SIDECAR_URL in main.py (router)
- deploy/llm-sidecar.service Environment
- deploy/README.md (.env example + config table)
- All 7 test files (conftest, circuit-breaker, fallback, queue,
  model-detection, sse-progress, v1-models)
2026-06-15 13:17:31 +00:00

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:8080"), \
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