| 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 |
| 161 | copied = client.copy(max_retries=7) |
| 162 | assert copied.max_retries == 7 |
| 163 | assert client.max_retries == 2 |
| 164 | |
| 165 | copied2 = copied.copy(max_retries=6) |
| 166 | assert copied2.max_retries == 6 |
| 167 | assert copied.max_retries == 7 |
| 168 | |
| 169 | # timeout |
| 170 | assert isinstance(client.timeout, httpx.Timeout) |
| 171 | copied = client.copy(timeout=None) |
| 172 | assert copied.timeout is None |
| 173 | assert isinstance(client.timeout, httpx.Timeout) |
| 174 | |
| 175 | def test_copy_default_headers(self) -> None: |
| 176 | client = OpenAI( |