test(auth): anon-auth fixture resets the per-profile token memo as a dict
#107697 (4bdd64b334) reset `_RESOLVE_TOKEN_CACHE` to None, matching the old single-slot memo. #107611 (173105ce6f, 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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user