MCPcopy
hub / github.com/openai/openai-python / test_enforce_credentials_true_async

Function test_enforce_credentials_true_async

tests/lib/test_azure.py:218–227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216
217
218def test_enforce_credentials_true_async() -> None:
219 with update_env(AZURE_OPENAI_API_KEY=Omit(), AZURE_OPENAI_AD_TOKEN=Omit()):
220 with pytest.raises(OpenAIError, match="Missing credentials"):
221 AsyncAzureOpenAI(
222 api_version="2024-02-01",
223 api_key=None,
224 azure_ad_token=None,
225 azure_ad_token_provider=None,
226 azure_endpoint="https://example-resource.azure.openai.com",
227 )
228
229
230@pytest.mark.respx()

Callers

nothing calls this directly

Calls 3

update_envFunction · 0.90
OmitClass · 0.90
AsyncAzureOpenAIClass · 0.90

Tested by

no test coverage detected