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

Method test_copy

tests/test_client.py:1410–1420  ·  tests/test_client.py::TestAsyncOpenAI.test_copy
(self, async_client: AsyncOpenAI)

Source from the content-addressed store, hash-verified

1408 assert response.json() == {class="st">"foo": class="st">"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=class="st">"another My API Key")
1415 assert copied.api_key == class="st">"another My API Key"
1416 assert async_client.api_key == class="st">"My API Key"
1417
1418 copied = async_client.copy(admin_api_key=class="st">"another My Admin API Key")
1419 assert copied.admin_api_key == class="st">"another My Admin API Key"
1420 assert async_client.admin_api_key == class="st">"My Admin API Key"
1421
1422 def test_copy_default_options(self, async_client: AsyncOpenAI) -> None:
1423 class="cm"># options that have a default are overridden correctly

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected