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

Method test_copy

tests/test_client.py:147–157  ·  view source on GitHub ↗
(self, client: OpenAI)

Source from the content-addressed store, hash-verified

145 assert response.json() == {"foo": "bar"}
146
147 def test_copy(self, client: OpenAI) -> None:
148 copied = client.copy()
149 assert id(copied) != id(client)
150
151 copied = client.copy(api_key="another My API Key")
152 assert copied.api_key == "another My API Key"
153 assert client.api_key == "My API Key"
154
155 copied = client.copy(admin_api_key="another My Admin API Key")
156 assert copied.admin_api_key == "another My Admin API Key"
157 assert client.admin_api_key == "My Admin API Key"
158
159 def test_copy_default_options(self, client: OpenAI) -> None:
160 # options that have a default are overridden correctly

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected