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

Method test_spend_control_sdk

tests/test_usage_modes.py:437–442  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

435 assert d.fallback_chain[0].cost_estimate >= 0
436
437 def test_spend_control_sdk(self) -> None:
438 from uncommon_route import SpendControl, InMemorySpendControlStorage
439 sc = SpendControl(storage=InMemorySpendControlStorage())
440 sc.set_limit("per_request", 0.05)
441 assert sc.check(0.03).allowed is True
442 assert sc.check(0.10).allowed is False
443
444 def test_openclaw_sdk(self) -> None:
445 from uncommon_route import openclaw_install, openclaw_status, openclaw_uninstall

Callers

nothing calls this directly

Calls 4

set_limitMethod · 0.95
checkMethod · 0.95
SpendControlClass · 0.90

Tested by

no test coverage detected