mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-28 08:14:48 +08:00
Fix: the test errors of test_nodes (#345)
This commit is contained in:
@@ -161,6 +161,7 @@ def mock_state_planner():
|
|||||||
def mock_configurable_planner():
|
def mock_configurable_planner():
|
||||||
mock = MagicMock()
|
mock = MagicMock()
|
||||||
mock.max_plan_iterations = 3
|
mock.max_plan_iterations = 3
|
||||||
|
mock.enable_deep_thinking = False
|
||||||
return mock
|
return mock
|
||||||
|
|
||||||
|
|
||||||
@@ -213,7 +214,7 @@ def test_planner_node_basic_has_enough_context(
|
|||||||
patch_ai_message,
|
patch_ai_message,
|
||||||
mock_plan,
|
mock_plan,
|
||||||
):
|
):
|
||||||
# AGENT_LLM_MAP["planner"] == "basic"
|
# AGENT_LLM_MAP["planner"] == "basic" and not thinking mode
|
||||||
with (
|
with (
|
||||||
patch("src.graph.nodes.AGENT_LLM_MAP", {"planner": "basic"}),
|
patch("src.graph.nodes.AGENT_LLM_MAP", {"planner": "basic"}),
|
||||||
patch("src.graph.nodes.get_llm_by_type") as mock_get_llm,
|
patch("src.graph.nodes.get_llm_by_type") as mock_get_llm,
|
||||||
@@ -241,7 +242,7 @@ def test_planner_node_basic_not_enough_context(
|
|||||||
patch_plan_model_validate,
|
patch_plan_model_validate,
|
||||||
patch_ai_message,
|
patch_ai_message,
|
||||||
):
|
):
|
||||||
# AGENT_LLM_MAP["planner"] == "basic"
|
# AGENT_LLM_MAP["planner"] == "basic" and not thinking mode
|
||||||
plan = {
|
plan = {
|
||||||
"has_enough_context": False,
|
"has_enough_context": False,
|
||||||
"title": "Test Plan",
|
"title": "Test Plan",
|
||||||
|
|||||||
Reference in New Issue
Block a user