test: bring stale weather, enrichment cache and diary import tests up to date
- Weather: the tool deliberately returns one Korean sentence about now
(c522e1b), so the tests check the place, condition, rounded temperature and
feels-like, and that no forecast, Fahrenheit or degree sign is left for the
model to echo.
- Enrichment cache: the conversational fast-path skips enrichment when no
data tool is routed, so the test routes one to reach the extractor.
- Diary import: mock PyQt6, requests and psutil only when they are not
installed. The MagicMock left in sys.modules for an installed PyQt6 broke
every later GUI test file in the same run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -139,7 +139,7 @@ def test_router_fallback_to_all_tools_is_not_cached(
|
||||
@patch("src.jarvis.memory.graph_ops.format_warm_profile_block", return_value="")
|
||||
@patch("src.jarvis.memory.graph_ops.build_warm_profile", return_value={"user": "", "directives": ""})
|
||||
@patch("src.jarvis.memory.graph.GraphMemoryStore")
|
||||
@patch("src.jarvis.reply.engine.select_tools", return_value=[])
|
||||
@patch("src.jarvis.reply.engine.select_tools", return_value=["webSearch"])
|
||||
@patch("src.jarvis.reply.engine.plan_query", return_value=[])
|
||||
@patch("src.jarvis.reply.engine.extract_search_params_for_memory", return_value={"keywords": ["x"], "questions": []})
|
||||
@patch("src.jarvis.memory.conversation.search_conversation_memory_by_keywords", return_value=[])
|
||||
@@ -154,7 +154,8 @@ def test_memory_extractor_cached_across_turns(
|
||||
|
||||
The recall gate would also fire on a tool-grounded follow-up, so we
|
||||
keep the dialogue free of tool messages here to exercise the extractor
|
||||
path on both turns.
|
||||
path on both turns. The router routes a data tool, because a turn with
|
||||
no data tool takes the conversational fast-path and skips enrichment.
|
||||
"""
|
||||
mock_chat.side_effect = [
|
||||
{"message": {"content": "first"}},
|
||||
|
||||
Reference in New Issue
Block a user