diff --git a/backend/tests/unit/core/agentscope/runtime/test_tasks.py b/backend/tests/unit/core/agentscope/runtime/test_tasks.py index 94d30ca..36d1ac8 100644 --- a/backend/tests/unit/core/agentscope/runtime/test_tasks.py +++ b/backend/tests/unit/core/agentscope/runtime/test_tasks.py @@ -57,6 +57,11 @@ async def test_run_agentscope_task_calls_runtime_run( _fake_get_redis_client, ) monkeypatch.setattr(tasks_module, "AsyncSessionLocal", lambda: _FakeSessionCtx()) + monkeypatch.setattr( + tasks_module, + "_build_recent_context_messages", + lambda **_: [], + ) result = await tasks_module.run_agentscope_task( { @@ -107,6 +112,11 @@ async def test_run_agentscope_task_includes_recent_context_messages( _fake_get_redis_client, ) monkeypatch.setattr(tasks_module, "AsyncSessionLocal", lambda: _FakeSessionCtx()) + monkeypatch.setattr( + tasks_module, + "_build_recent_context_messages", + lambda **_: [], + ) monkeypatch.setattr( tasks_module, "_build_recent_context_messages",