Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

from zeroentropy import ZeroEntropy, AsyncZeroEntropy, APIResponseValidationError
from zeroentropy._types import Omit
from zeroentropy._utils import maybe_transform
from zeroentropy._models import BaseModel, FinalRequestOptions
from zeroentropy._constants import RAW_RESPONSE_HEADER
from zeroentropy._exceptions import APIStatusError, APITimeoutError, ZeroEntropyError, APIResponseValidationError
Expand All @@ -32,6 +33,7 @@
BaseClient,
make_request_options,
)
from zeroentropy.types.status_get_status_params import StatusGetStatusParams

from .utils import update_env

Expand Down Expand Up @@ -727,7 +729,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
with pytest.raises(APITimeoutError):
self.client.post(
"/status/get-status",
body=cast(object, dict()),
body=cast(object, maybe_transform(dict(), StatusGetStatusParams)),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand All @@ -742,7 +744,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
with pytest.raises(APIStatusError):
self.client.post(
"/status/get-status",
body=cast(object, dict()),
body=cast(object, maybe_transform(dict(), StatusGetStatusParams)),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand Down Expand Up @@ -1503,7 +1505,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
with pytest.raises(APITimeoutError):
await self.client.post(
"/status/get-status",
body=cast(object, dict()),
body=cast(object, maybe_transform(dict(), StatusGetStatusParams)),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand All @@ -1518,7 +1520,7 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
with pytest.raises(APIStatusError):
await self.client.post(
"/status/get-status",
body=cast(object, dict()),
body=cast(object, maybe_transform(dict(), StatusGetStatusParams)),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand Down