|
17 | 17 | from pydantic import ValidationError
|
18 | 18 |
|
19 | 19 | from orb import Orb, AsyncOrb, APIResponseValidationError
|
| 20 | +from orb._types import Omit |
20 | 21 | from orb._models import BaseModel, FinalRequestOptions
|
21 | 22 | from orb._constants import RAW_RESPONSE_HEADER
|
22 | 23 | from orb._exceptions import OrbError, APIStatusError, APITimeoutError, APIResponseValidationError
|
@@ -319,7 +320,8 @@ def test_validate_headers(self) -> None:
|
319 | 320 | assert request.headers.get("Authorization") == f"Bearer {api_key}"
|
320 | 321 |
|
321 | 322 | with pytest.raises(OrbError):
|
322 |
| - client2 = Orb(base_url=base_url, api_key=None, _strict_response_validation=True) |
| 323 | + with update_env(**{"ORB_API_KEY": Omit()}): |
| 324 | + client2 = Orb(base_url=base_url, api_key=None, _strict_response_validation=True) |
323 | 325 | _ = client2
|
324 | 326 |
|
325 | 327 | def test_default_query_option(self) -> None:
|
@@ -1076,7 +1078,8 @@ def test_validate_headers(self) -> None:
|
1076 | 1078 | assert request.headers.get("Authorization") == f"Bearer {api_key}"
|
1077 | 1079 |
|
1078 | 1080 | with pytest.raises(OrbError):
|
1079 |
| - client2 = AsyncOrb(base_url=base_url, api_key=None, _strict_response_validation=True) |
| 1081 | + with update_env(**{"ORB_API_KEY": Omit()}): |
| 1082 | + client2 = AsyncOrb(base_url=base_url, api_key=None, _strict_response_validation=True) |
1080 | 1083 | _ = client2
|
1081 | 1084 |
|
1082 | 1085 | def test_default_query_option(self) -> None:
|
|
0 commit comments