|
17 | 17 | from pydantic import ValidationError |
18 | 18 |
|
19 | 19 | from runloop_api_client import Runloop, AsyncRunloop, APIResponseValidationError |
| 20 | +from runloop_api_client._types import Omit |
20 | 21 | from runloop_api_client._models import BaseModel, FinalRequestOptions |
21 | 22 | from runloop_api_client._constants import RAW_RESPONSE_HEADER |
22 | 23 | from runloop_api_client._exceptions import RunloopError, APIStatusError, APITimeoutError, APIResponseValidationError |
@@ -340,7 +341,8 @@ def test_validate_headers(self) -> None: |
340 | 341 | assert request.headers.get("Authorization") == f"Bearer {bearer_token}" |
341 | 342 |
|
342 | 343 | with pytest.raises(RunloopError): |
343 | | - client2 = Runloop(base_url=base_url, bearer_token=None, _strict_response_validation=True) |
| 344 | + with update_env(**{"RUNLOOP_API_KEY": Omit()}): |
| 345 | + client2 = Runloop(base_url=base_url, bearer_token=None, _strict_response_validation=True) |
344 | 346 | _ = client2 |
345 | 347 |
|
346 | 348 | def test_default_query_option(self) -> None: |
@@ -1072,7 +1074,8 @@ def test_validate_headers(self) -> None: |
1072 | 1074 | assert request.headers.get("Authorization") == f"Bearer {bearer_token}" |
1073 | 1075 |
|
1074 | 1076 | with pytest.raises(RunloopError): |
1075 | | - client2 = AsyncRunloop(base_url=base_url, bearer_token=None, _strict_response_validation=True) |
| 1077 | + with update_env(**{"RUNLOOP_API_KEY": Omit()}): |
| 1078 | + client2 = AsyncRunloop(base_url=base_url, bearer_token=None, _strict_response_validation=True) |
1076 | 1079 | _ = client2 |
1077 | 1080 |
|
1078 | 1081 | def test_default_query_option(self) -> None: |
|
0 commit comments