MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / test_env_api_key

Function test_env_api_key

tests/lib/test_aws.py:306–311  ·  view source on GitHub ↗
(monkeypatch: pytest.MonkeyPatch)

Source from the content-addressed store, hash-verified

304
305
306def test_env_api_key(monkeypatch: pytest.MonkeyPatch) -> None:
307 monkeypatch.setenv("ANTHROPIC_AWS_API_KEY", "env-key")
308 monkeypatch.delenv("AWS_REGION", raising=False)
309 client = AnthropicAWS(base_url="https://example.com", workspace_id="ws-123")
310 assert client.api_key == "env-key"
311 assert client._use_sigv4 is False
312
313
314def test_env_region(monkeypatch: pytest.MonkeyPatch) -> None:

Callers

nothing calls this directly

Calls 1

AnthropicAWSClass · 0.90

Tested by

no test coverage detected