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

Class TestApiVersionConfiguration

tests/unit/test_anthropic_proxy_provider.py:215–228  ·  view source on GitHub ↗

Tests for ANTHROPIC_PROXY_API_VERSION env var.

Source from the content-addressed store, hash-verified

213
214
215class TestApiVersionConfiguration:
216 """Tests for ANTHROPIC_PROXY_API_VERSION env var."""
217
218 def test_default_api_version(self, monkeypatch: pytest.MonkeyPatch) -> None:
219 monkeypatch.delenv("ANTHROPIC_PROXY_API_VERSION", raising=False)
220 assert _get_api_version() == "vertex-2023-10-16"
221
222 def test_custom_api_version(self, monkeypatch: pytest.MonkeyPatch) -> None:
223 monkeypatch.setenv("ANTHROPIC_PROXY_API_VERSION", "bedrock-2023-05-31")
224 assert _get_api_version() == "bedrock-2023-05-31"
225
226 def test_empty_string_falls_back_to_default(self, monkeypatch: pytest.MonkeyPatch) -> None:
227 monkeypatch.setenv("ANTHROPIC_PROXY_API_VERSION", " ")
228 assert _get_api_version() == DEFAULT_API_VERSION
229
230
231class TestProviderSelection:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected