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

Function trace_client

tests/test_traces.py:20–29  ·  view source on GitHub ↗
(monkeypatch: pytest.MonkeyPatch)

Source from the content-addressed store, hash-verified

18
19@pytest.fixture
20def trace_client(monkeypatch: pytest.MonkeyPatch) -> TestClient:
21 monkeypatch.setenv("UNCOMMON_ROUTE_ADMIN_TOKEN", "test-admin")
22 app = create_app(
23 upstream="http://127.0.0.1:1/fake",
24 spend_control=SpendControl(storage=InMemorySpendControlStorage()),
25 route_stats=RouteStats(storage=InMemoryRouteStatsStorage()),
26 feedback=FeedbackCollector(),
27 trace_store=TraceStore(storage=InMemoryTraceStorage()),
28 )
29 return TestClient(app, raise_server_exceptions=False)
30
31
32class TestTraceStore:

Callers

nothing calls this directly

Calls 8

create_appFunction · 0.90
SpendControlClass · 0.90
RouteStatsClass · 0.90
FeedbackCollectorClass · 0.90
TraceStoreClass · 0.90

Tested by

no test coverage detected