test(providers): force Anthropic fallback tests past cached imports (#4770)
This commit is contained in:
parent
06902d8038
commit
f4c0064d16
1 changed files with 3 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
"""Regression tests for #4770 - Anthropic OAuth env vars in fallback detection."""
|
||||
|
||||
import builtins
|
||||
import sys
|
||||
|
||||
import api.config as config
|
||||
|
||||
|
|
@ -8,6 +9,8 @@ import api.config as config
|
|||
def _force_env_fallback(monkeypatch):
|
||||
"""Force get_available_models() into the env-based fallback branch."""
|
||||
real_import = builtins.__import__
|
||||
monkeypatch.delitem(sys.modules, "hermes_cli.auth", raising=False)
|
||||
monkeypatch.delitem(sys.modules, "hermes_cli", raising=False)
|
||||
|
||||
def fake_import(name, globals=None, locals=None, fromlist=(), level=0):
|
||||
if name in ("hermes_cli.models", "hermes_cli.auth"):
|
||||
|
|
|
|||
Loading…
Reference in a new issue