mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-25 11:10:18 +00:00
stage-314 absorb: isolate CODEX_HOME in v0.51.19 codex provider card tests
PR #1827 introduced _read_visible_codex_cache_model_ids() merging into the providers card live-fetch path. The two v0.51.19 tests in tests/test_issue1807_codex_provider_card_live_models.py predate that helper and didn't isolate CODEX_HOME, so the dev machine's real ~/.codex/models_cache.json (which contains entries like gpt-5.3-codex-spark from #1680) was leaking into their assertions. Add CODEX_HOME isolation in the existing _configure_codex helper — matches the pattern PR #1827's own test already uses. Test-only fix; production code unchanged. Caught by pre-release pytest gate.
This commit is contained in:
@@ -35,6 +35,14 @@ def _configure_codex(monkeypatch, tmp_path):
|
||||
"fallback_providers": [],
|
||||
})
|
||||
monkeypatch.setattr(config, "_cfg_mtime", 0.0)
|
||||
# Isolate the Codex local model cache so the dev machine's real
|
||||
# ~/.codex/models_cache.json (which may include account-specific entries
|
||||
# like gpt-5.3-codex-spark) doesn't leak into these tests. Stage-314
|
||||
# added _read_visible_codex_cache_model_ids() merging via PR #1827, so
|
||||
# CODEX_HOME isolation is now load-bearing for these v0.51.19 tests.
|
||||
codex_home = tmp_path / "no-codex"
|
||||
codex_home.mkdir()
|
||||
monkeypatch.setenv("CODEX_HOME", str(codex_home))
|
||||
|
||||
|
||||
def _codex_provider():
|
||||
|
||||
Reference in New Issue
Block a user