test: pin the OpenRouter memo empty in the no-socket test; import hygiene (gate r2 nits)
This commit is contained in:
@@ -140,8 +140,6 @@ async def test_picker_path_offloads_list_picker_providers(_isolated_config, monk
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_picker_path_lists_cache_only_and_probes_only_the_current_custom_endpoint(_isolated_config, monkeypatch):
|
||||
"""#74003: the chat ``/model`` reply is a read path. The listing must ask for cache-only catalogs
|
||||
|
||||
@@ -17,6 +17,7 @@ network or auth state is required.
|
||||
|
||||
import pytest
|
||||
from hermes_cli import model_switch
|
||||
import hermes_cli.models as models_mod
|
||||
import hermes_cli.model_switch_providers as hermes_cli_model_switch_providers
|
||||
from hermes_cli import model_switch_providers
|
||||
|
||||
@@ -246,9 +247,8 @@ def test_non_blocking_listing_opens_no_socket(monkeypatch, tmp_path):
|
||||
"""#74003: ``non_blocking_catalogs=True`` must not run a single live catalog probe in the calling
|
||||
thread — not the per-provider ``/models`` prefetch and not OpenRouter's curated-catalog GET —
|
||||
even with several credentialed providers and an empty on-disk cache."""
|
||||
import hermes_cli.models as models_mod
|
||||
|
||||
monkeypatch.setenv("HERMES_HOME", str(tmp_path))
|
||||
monkeypatch.setattr(models_mod, "_openrouter_catalog_cache", None)
|
||||
for key in ("OPENAI_API_KEY", "ANTHROPIC_API_KEY", "DEEPSEEK_API_KEY", "GROQ_API_KEY",
|
||||
"MISTRAL_API_KEY", "XAI_API_KEY", "OPENROUTER_API_KEY"):
|
||||
monkeypatch.setenv(key, "dummy")
|
||||
|
||||
Reference in New Issue
Block a user