| 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 |