The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: initialize owner store for dashboard refresh success
Tekniuma1811942e41b
diff --git a/tests/hermes_cli/test_dashboard_auth_401_reauth.py b/tests/hermes_cli/test_dashboard_auth_401_reauth.pyindex c96ae1503d3..f9ca190e9c0 100644--- a/tests/hermes_cli/test_dashboard_auth_401_reauth.py+++ b/tests/hermes_cli/test_dashboard_auth_401_reauth.py@@ -223,6 +223,13 @@ class TestTransparentRefreshOnAccessTokenEviction:self.refresh_calls += 1raise AssertionError("foreign refresh token reached Basic provider")+ # Browsing is read-only; initialize the real store as its owner would.+ from contextlib import closing+ from hermes_state import SessionDB++ with closing(SessionDB()) as db:+ db.create_session("refresh-owner-session", source="cli")+wrong = WrongProvider()_provider, valid_rt = self._build_rt_only_app()clear_providers()@@ -235,6 +242,7 @@ class TestTransparentRefreshOnAccessTokenEviction:response = gated_app.get("/api/sessions", follow_redirects=False)assert response.status_code == 200+ assert [row["id"] for row in response.json()["sessions"]] == ["refresh-owner-session"]assert wrong.refresh_calls == 0assert any(SESSION_PROVIDER_COOKIE in cookie and "stub" in cookie