The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: mock load_config_readonly in memory status gate tests
Tekniuma92412ede151
diff --git a/tests/hermes_cli/test_memory_setup.py b/tests/hermes_cli/test_memory_setup.pyindex 674a9b51d14..84bb7ec02d8 100644--- a/tests/hermes_cli/test_memory_setup.py+++ b/tests/hermes_cli/test_memory_setup.py@@ -100,9 +100,11 @@ def test_install_dependencies_force_reinstalls_versioned_specs(tmp_path, monkeypdef test_cmd_status_memory_tool_gate_disabled(capsys, monkeypatch):"""When both memory stores are disabled, Memory status reports memory tool as disabled."""+ _cfg = {"memory": {"memory_enabled": False, "user_profile_enabled": False}}+ monkeypatch.setattr("hermes_cli.config.load_config", lambda: _cfg)+ # check_memory_requirements() reads the readonly loader, not load_config.monkeypatch.setattr(- "hermes_cli.config.load_config",- lambda: {"memory": {"memory_enabled": False, "user_profile_enabled": False}},+ "hermes_cli.config.load_config_readonly", lambda: _cfg, raising=False)monkeypatch.setattr(memory_setup, "_get_available_providers", lambda: [])@@ -116,9 +118,10 @@ def test_cmd_status_memory_tool_gate_disabled(capsys, monkeypatch):def test_cmd_status_memory_tool_gate_enabled(capsys, monkeypatch):"""When at least one memory store is enabled, Memory status reports memory tool as enabled."""+ _cfg = {"memory": {"memory_enabled": True, "user_profile_enabled": False}}+ monkeypatch.setattr("hermes_cli.config.load_config", lambda: _cfg)monkeypatch.setattr(- "hermes_cli.config.load_config",- lambda: {"memory": {"memory_enabled": True, "user_profile_enabled": False}},+ "hermes_cli.config.load_config_readonly", lambda: _cfg, raising=False)monkeypatch.setattr(memory_setup, "_get_available_providers", lambda: [])