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

Function test_region_derived_base_url

tests/lib/test_bedrock.py:102–108  ·  view source on GitHub ↗
(client_cls: type[Client])

Source from the content-addressed store, hash-verified

100
101@pytest.mark.parametrize("client_cls", [BedrockOpenAI, AsyncBedrockOpenAI])
102def test_region_derived_base_url(client_cls: type[Client]) -> None:
103 with update_env(AWS_BEDROCK_BASE_URL=Omit(), AWS_REGION="us-east-1", AWS_DEFAULT_REGION=Omit()):
104 client = (
105 make_sync_client(api_key="token") if client_cls is BedrockOpenAI else make_async_client(api_key="token")
106 )
107
108 assert client.base_url == URL("https://bedrock-mantle.us-east-1.api.aws/openai/v1/")
109
110
111@pytest.mark.parametrize("client_cls", [BedrockOpenAI, AsyncBedrockOpenAI])

Callers

nothing calls this directly

Calls 4

update_envFunction · 0.90
OmitClass · 0.90
make_sync_clientFunction · 0.85
make_async_clientFunction · 0.85

Tested by

no test coverage detected