mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-19 16:12:30 +00:00
fix(test): seed get_or_create mock for session-refresh guard compatibility
This commit is contained in:
parent
5bb94edc99
commit
c58a360b25
@ -387,6 +387,7 @@ class TestConsolidationUnaffectedByUnifiedSession:
|
|||||||
|
|
||||||
session = Session(key="unified:default")
|
session = Session(key="unified:default")
|
||||||
session.messages = [{"role": "user", "content": "msg"}]
|
session.messages = [{"role": "user", "content": "msg"}]
|
||||||
|
sessions.get_or_create.return_value = session
|
||||||
|
|
||||||
# Simulate over-budget: estimated > budget
|
# Simulate over-budget: estimated > budget
|
||||||
consolidator.estimate_session_prompt_tokens = MagicMock(return_value=(950, "tiktoken"))
|
consolidator.estimate_session_prompt_tokens = MagicMock(return_value=(950, "tiktoken"))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user