From 1d938832a7dfd2cd661d50017ff839d599a820db Mon Sep 17 00:00:00 2001 From: Stephen Schoettler Date: Thu, 30 Apr 2026 20:26:54 -0700 Subject: [PATCH] test(kanban): patch dashboard websocket token stub --- tests/plugins/test_kanban_dashboard_plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/plugins/test_kanban_dashboard_plugin.py b/tests/plugins/test_kanban_dashboard_plugin.py index 23589ce690..32e40ceb4e 100644 --- a/tests/plugins/test_kanban_dashboard_plugin.py +++ b/tests/plugins/test_kanban_dashboard_plugin.py @@ -505,9 +505,11 @@ def test_ws_events_rejects_when_token_required(tmp_path, monkeypatch): kb.init_db() # Stub web_server so _check_ws_token has a token to compare against. + import hermes_cli import types stub = types.SimpleNamespace(_SESSION_TOKEN="secret-xyz") monkeypatch.setitem(sys.modules, "hermes_cli.web_server", stub) + monkeypatch.setattr(hermes_cli, "web_server", stub, raising=False) app = FastAPI() app.include_router(_load_plugin_router(), prefix="/api/plugins/kanban")