Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(test): seed get_or_create mock for session-refresh guard compatibility
chengyongruc58a360b2533
diff --git a/tests/agent/test_unified_session.py b/tests/agent/test_unified_session.pyindex 839f62f57..f22290ba6 100644--- a/tests/agent/test_unified_session.py+++ b/tests/agent/test_unified_session.py@@ -387,6 +387,7 @@ class TestConsolidationUnaffectedByUnifiedSession:session = Session(key="unified:default")session.messages = [{"role": "user", "content": "msg"}]+ sessions.get_or_create.return_value = session# Simulate over-budget: estimated > budgetconsolidator.estimate_session_prompt_tokens = MagicMock(return_value=(950, "tiktoken"))