fix: drop dead shutil.which patches in bot-chat delivery tests
Review finding (minor): after the module-first reorder in cron/scheduler_delivery.py the delivery.shutil.which -> /bin/hermes monkeypatches were unreachable; both tests already accept the module argv.
This commit is contained in:
@@ -43,7 +43,6 @@ def test_cli_keeps_discovered_home_when_launch_selection_changes(tmp_path, monke
|
||||
return subprocess.CompletedProcess(argv, 0, "", "")
|
||||
|
||||
monkeypatch.setattr("tools.bot_live_delivery.find_canonical_live_owner", discover)
|
||||
monkeypatch.setattr(delivery.shutil, "which", lambda _: "/bin/hermes")
|
||||
monkeypatch.setattr(delivery.subprocess, "run", run)
|
||||
try:
|
||||
assert delivery._deliver_to_bot_chat({"id": "job"}, "output", profile) is None
|
||||
|
||||
@@ -37,7 +37,6 @@ def test_deferred_destination_does_not_follow_root_changes(tmp_path, monkeypatch
|
||||
monkeypatch.setattr("hermes_cli.profiles.get_profile_dir", lambda _: other)
|
||||
run = Mock(return_value=subprocess.CompletedProcess([], 0, "", ""))
|
||||
monkeypatch.setattr(delivery.subprocess, "run", run)
|
||||
monkeypatch.setattr(delivery.shutil, "which", lambda _: "/bin/hermes")
|
||||
if recipient == "desktop":
|
||||
lease, refusal = try_acquire_active_session(
|
||||
session_id="chat", surface="desktop", config={}, registry_home=home,
|
||||
|
||||
Reference in New Issue
Block a user