test(copilot-acp): patch HERMES_HOME alongside HOME in hub-block test

file_safety now uses profile-aware get_hermes_home(), so the test
fixture must override HERMES_HOME too — otherwise it resolves to the
conftest's isolated tempdir and the hub-cache path doesn't match.
This commit is contained in:
Teknium 2026-04-21 00:38:20 -07:00 committed by Teknium
parent 9a655ff57b
commit 71668559be

View file

@ -57,7 +57,11 @@ class CopilotACPClientSafetyTests(unittest.TestCase):
blocked.parent.mkdir(parents=True, exist_ok=True)
blocked.write_text('{"token":"sk-test-secret-1234567890"}')
with patch.dict(os.environ, {"HOME": str(home)}, clear=False):
with patch.dict(
os.environ,
{"HOME": str(home), "HERMES_HOME": str(home / ".hermes")},
clear=False,
):
response = self._dispatch(
{
"jsonrpc": "2.0",