From 0c0983ab21d55b1f709ece164b77ad1956167278 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 10 Sep 2026 18:29:52 -0700 Subject: [PATCH] test(auth): anon-auth fixture resets the per-profile token memo as a dict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #107697 (4bdd64b334a) reset `_RESOLVE_TOKEN_CACHE` to None, matching the old single-slot memo. #107611 (173105ce6f4, merged the same hour) turned the memo into a dict keyed by profile home, so `.get()` on None raised AttributeError in `resolve_nous_access_token` and two anon-auth tests went red on main. Reset to an empty dict — the memo shape the code now owns. --- tests/hermes_cli/test_anon_auth_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/hermes_cli/test_anon_auth_core.py b/tests/hermes_cli/test_anon_auth_core.py index 390c9a36a6..9c5b8f2f77 100644 --- a/tests/hermes_cli/test_anon_auth_core.py +++ b/tests/hermes_cli/test_anon_auth_core.py @@ -91,10 +91,10 @@ def portal(monkeypatch, tmp_path): anon_auth._mint_failed = False from hermes_cli import free_tier_bootstrap as _fb _fb.reset_for_tests() - # resolve_nous_access_token memoises the last token for 5 s across the process; a token minted + # resolve_nous_access_token memoises the last token for 5 s per profile home (dict); a token minted # by an earlier test must not be served to this one. from hermes_cli import auth as auth_mod - monkeypatch.setattr(auth_mod, "_RESOLVE_TOKEN_CACHE", None) + monkeypatch.setattr(auth_mod, "_RESOLVE_TOKEN_CACHE", {}) return fake