MCPcopy Create free account
hub / github.com/NVIDIA/SkillSpector / test_select_openai

Method test_select_openai

tests/unit/test_providers.py:321–328  ·  view source on GitHub ↗
(self, monkeypatch: pytest.MonkeyPatch)

Source from the content-addressed store, hash-verified

319 assert base_url == expected_url
320
321 def test_select_openai(self, monkeypatch: pytest.MonkeyPatch) -> None:
322 monkeypatch.setenv("SKILLSPECTOR_PROVIDER", "openai")
323 monkeypatch.setenv("OPENAI_API_KEY", "sk-x")
324 # NVIDIA env set but ignored when SKILLSPECTOR_PROVIDER=openai.
325 monkeypatch.setenv("NVIDIA_INFERENCE_KEY", "should-be-ignored")
326 creds = resolve_provider_credentials()
327 assert creds == ("sk-x", None)
328 assert isinstance(get_metadata_provider(), OpenAIProvider)
329
330 def test_select_anthropic(self, monkeypatch: pytest.MonkeyPatch) -> None:
331 monkeypatch.setenv("SKILLSPECTOR_PROVIDER", "anthropic")

Callers

nothing calls this directly

Calls 2

get_metadata_providerFunction · 0.90

Tested by

no test coverage detected