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