aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_llm.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_llm.py')
-rw-r--r--tests/test_llm.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_llm.py b/tests/test_llm.py
index 759666c..9cdfcf6 100644
--- a/tests/test_llm.py
+++ b/tests/test_llm.py
@@ -27,6 +27,15 @@ class Up(unittest.TestCase):
self.assertEqual(st["claude"]["context_pct"], 12)
self.assertEqual(st["opencode"]["total_cost"], 1.5)
+ def test_handles_the_real_latest_shape(self):
+ data = {"/api/claude_limits": {"latest": {"context_pct": 42, "five_hour_pct": 10}},
+ "/api/claude_session": {},
+ "/api/summary": {}}
+ st = llm.make({"llm": {"url": "http://x"},
+ "fetch": lambda u, timeout=2: data[u]}).state()
+ self.assertEqual(st["claude"]["context_pct"], 42)
+ self.assertEqual(st["claude"]["five_hour_pct"], 10)
+
if __name__ == "__main__":
unittest.main()