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

Function test_log_entry_json

tests/test_observability.py:23–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21
22
23def test_log_entry_json():
24 entry = RoutingLogEntry(
25 request_id="req_123",
26 signals={"metadata": {"tier": 0, "confidence": 0.85}},
27 decision_tier=0,
28 decision_confidence=0.82,
29 method="direct",
30 model="deepseek-chat",
31 )
32 j = entry.to_json()
33 parsed = json.loads(j)
34 assert parsed["request_id"] == "req_123"
35 assert parsed["decision_tier"] == 0
36
37
38def test_metrics_reset():

Callers

nothing calls this directly

Calls 2

to_jsonMethod · 0.95
RoutingLogEntryClass · 0.90

Tested by

no test coverage detected