MCPcopy Index your code
hub / github.com/openai/openai-python / test_copy

Method test_copy

tests/test_client.py:1410–1420  ·  view source on GitHub ↗
(self, async_client: AsyncOpenAI)

Source from the content-addressed store, hash-verified

1408 assert response.json() == {"foo": "bar"}
1409
1410 def test_copy(self, async_client: AsyncOpenAI) -> None:
1411 copied = async_client.copy()
1412 assert id(copied) != id(async_client)
1413
1414 copied = async_client.copy(api_key="another My API Key")
1415 assert copied.api_key == "another My API Key"
1416 assert async_client.api_key == "My API Key"
1417
1418 copied = async_client.copy(admin_api_key="another My Admin API Key")
1419 assert copied.admin_api_key == "another My Admin API Key"
1420 assert async_client.admin_api_key == "My Admin API Key"
1421
1422 def test_copy_default_options(self, async_client: AsyncOpenAI) -> None:
1423 # options that have a default are overridden correctly

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected