diff --git a/tests/gateway/test_approve_deny_commands.py b/tests/gateway/test_approve_deny_commands.py index 7976838ef05f..d715f26d5faf 100644 --- a/tests/gateway/test_approve_deny_commands.py +++ b/tests/gateway/test_approve_deny_commands.py @@ -414,6 +414,10 @@ class TestBareTextNoLongerApproves: class TestBlockingApprovalE2E: """Test the full blocking flow: agent thread blocks → user approves → agent resumes.""" + @pytest.fixture(autouse=True) + def _manual_approval_mode(self, monkeypatch): + monkeypatch.setattr("tools.approval._get_approval_mode", lambda: "manual") + def setup_method(self): _clear_approval_state() os.environ.pop("HERMES_YOLO_MODE", None) @@ -744,6 +748,10 @@ class TestCrossSessionApprovalIsolation: even when ``os.environ`` has been clobbered to session B. """ + @pytest.fixture(autouse=True) + def _manual_approval_mode(self, monkeypatch): + monkeypatch.setattr("tools.approval._get_approval_mode", lambda: "manual") + def setup_method(self): _clear_approval_state() os.environ.pop("HERMES_SESSION_KEY", None)