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

Method test_copy

tests/test_client.py:147–157  ·  tests/test_client.py::TestOpenAI.test_copy
(self, client: OpenAI)

Source from the content-addressed store, hash-verified

145 assert response.json() == {class="st">"foo": class="st">"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=class="st">"another My API Key")
152 assert copied.api_key == class="st">"another My API Key"
153 assert client.api_key == class="st">"My API Key"
154
155 copied = client.copy(admin_api_key=class="st">"another My Admin API Key")
156 assert copied.admin_api_key == class="st">"another My Admin API Key"
157 assert client.admin_api_key == class="st">"My Admin API Key"
158
159 def test_copy_default_options(self, client: OpenAI) -> None:
160 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