test(auth): seed _persisted_token_pairs in the __new__ pool fixture

The terminal-refresh visibility tests build CredentialPool via __new__ and
hand-set its slots, bypassing __init__. Since _persist() now reads
self._persisted_token_pairs directly (the getattr shim was dropped on
purpose), the four cases that reach _persist raised AttributeError. Seed
the attribute in the fixture like the other slots instead of restoring a
defensive getattr in production code.
This commit is contained in:
kshitijk4poor
2026-09-24 14:21:41 +05:30
committed by kshitij
parent 6600852299
commit ffcc536fc4

View File

@@ -30,6 +30,7 @@ def _pool(provider: str) -> CredentialPool:
pool._current_id = None
pool._max_concurrent = 2
pool._unmatched_rotation_streak = 0
pool._persisted_token_pairs = {}
pool.provider = provider
return pool