MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _isolate_proxy_defaults

Function _isolate_proxy_defaults

tests/conftest.py:37–61  ·  view source on GitHub ↗
(monkeypatch: pytest.MonkeyPatch)

Source from the content-addressed store, hash-verified

35
36@pytest.fixture(autouse=True)
37def _isolate_proxy_defaults(monkeypatch: pytest.MonkeyPatch) -> None:
38 monkeypatch.setattr(
39 "uncommon_route.proxy._LOCAL_CLIENT_HOSTS",
40 {"127.0.0.1", "::1", "localhost", "testclient"},
41 )
42 monkeypatch.setattr(
43 "uncommon_route.proxy.ConnectionsStore",
44 lambda: ConnectionsStore(storage=InMemoryConnectionsStorage()),
45 )
46 monkeypatch.setattr(
47 "uncommon_route.proxy.load_providers",
48 lambda: ProvidersConfig(),
49 )
50 monkeypatch.setattr(
51 "uncommon_route.proxy.ModelExperienceStore",
52 lambda: ModelExperienceStore(storage=InMemoryModelExperienceStorage()),
53 )
54 monkeypatch.setattr(
55 "uncommon_route.proxy.RoutingConfigStore",
56 lambda: RoutingConfigStore(storage=InMemoryRoutingConfigStorage()),
57 )
58 monkeypatch.setattr(
59 "uncommon_route.proxy._get_client",
60 lambda: _ImmediateFailingClient(),
61 )

Callers

nothing calls this directly

Tested by

no test coverage detected