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

Method test_clear_limit

tests/test_spend_control.py:68–73  ·  view source on GitHub ↗
(self, spend_control: SpendControl)

Source from the content-addressed store, hash-verified

66 assert sc.check(10.00).allowed is True
67
68 def test_clear_limit(self, spend_control: SpendControl) -> None:
69 spend_control.set_limit("per_request", 0.01)
70 assert spend_control.check(0.05).allowed is False
71
72 spend_control.clear_limit("per_request")
73 assert spend_control.check(0.05).allowed is True
74
75 def test_set_invalid_limit_raises(self, spend_control: SpendControl) -> None:
76 with pytest.raises(ValueError):

Callers

nothing calls this directly

Calls 3

set_limitMethod · 0.80
checkMethod · 0.80
clear_limitMethod · 0.80

Tested by

no test coverage detected