mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-13 03:52:00 +00:00
test(kanban): patch dashboard websocket token stub
This commit is contained in:
parent
f7918c9349
commit
1d938832a7
1 changed files with 2 additions and 0 deletions
|
|
@ -505,9 +505,11 @@ def test_ws_events_rejects_when_token_required(tmp_path, monkeypatch):
|
||||||
kb.init_db()
|
kb.init_db()
|
||||||
|
|
||||||
# Stub web_server so _check_ws_token has a token to compare against.
|
# Stub web_server so _check_ws_token has a token to compare against.
|
||||||
|
import hermes_cli
|
||||||
import types
|
import types
|
||||||
stub = types.SimpleNamespace(_SESSION_TOKEN="secret-xyz")
|
stub = types.SimpleNamespace(_SESSION_TOKEN="secret-xyz")
|
||||||
monkeypatch.setitem(sys.modules, "hermes_cli.web_server", stub)
|
monkeypatch.setitem(sys.modules, "hermes_cli.web_server", stub)
|
||||||
|
monkeypatch.setattr(hermes_cli, "web_server", stub, raising=False)
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
app.include_router(_load_plugin_router(), prefix="/api/plugins/kanban")
|
app.include_router(_load_plugin_router(), prefix="/api/plugins/kanban")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue