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

Method test_history

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

Source from the content-addressed store, hash-verified

94 assert s.calls == 2
95
96 def test_history(self, spend_control: SpendControl) -> None:
97 spend_control.record(0.10, model="a")
98 spend_control.record(0.20, model="b")
99 spend_control.record(0.30, model="c")
100
101 records = spend_control.history(limit=2)
102 assert len(records) == 2
103 assert records[0].model == "c" # most recent first
104 assert records[1].model == "b"
105
106 def test_reset_session(self, spend_control: SpendControl) -> None:
107 spend_control.set_limit("session", 1.00)

Callers

nothing calls this directly

Calls 2

recordMethod · 0.45
historyMethod · 0.45

Tested by

no test coverage detected