mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 02:05:22 -04:00
Fix fresh checkout test failures
Make .env optional in tests and prevent endpoint resolver stubs from leaking into model route tests.
This commit is contained in:
@@ -6,6 +6,13 @@ from unittest.mock import MagicMock
|
||||
import httpx
|
||||
import pytest
|
||||
|
||||
_endpoint_resolver = sys.modules.get("src.endpoint_resolver")
|
||||
if _endpoint_resolver is not None and not getattr(_endpoint_resolver, "__file__", None):
|
||||
# Other tests stub this module during collection. These helper tests need
|
||||
# the real URL normalization helpers so Anthropic /v1 handling is covered.
|
||||
sys.modules.pop("src.endpoint_resolver", None)
|
||||
sys.modules.pop("routes.model_routes", None)
|
||||
|
||||
if "core.database" not in sys.modules:
|
||||
_core_db = types.ModuleType("core.database")
|
||||
for _name in [
|
||||
|
||||
Reference in New Issue
Block a user