The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(tests): return Path from get_hermes_home mock in slash_worker profile test
Lauraf84f1dd13231
diff --git a/tests/tui_gateway/test_slash_worker_profile_home.py b/tests/tui_gateway/test_slash_worker_profile_home.pyindex e8589c78619..22dd576fe18 100644--- a/tests/tui_gateway/test_slash_worker_profile_home.py+++ b/tests/tui_gateway/test_slash_worker_profile_home.py@@ -3,6 +3,7 @@import osimport subprocessimport sys+from pathlib import Pathfrom unittest.mock import MagicMock, patch, callimport pytest@@ -11,7 +12,10 @@ import pytestdef test_slash_worker_accepts_profile_home():"""_SlashWorker.__init__ accepts profile_home parameter."""with patch.dict("sys.modules", {- "hermes_constants": MagicMock(get_hermes_home=MagicMock(return_value="/tmp/hermes_test")),+ # get_hermes_home() returns a Path in production; hermes_state.py's+ # module-level DEFAULT_DB_PATH = get_hermes_home() / "state.db" does path+ # division, so a str mock makes the import raise TypeError (str / str).+ "hermes_constants": MagicMock(get_hermes_home=MagicMock(return_value=Path("/tmp/hermes_test"))),}):with patch("subprocess.Popen") as mock_popen:mock_popen.return_value.stdout = MagicMock()