2323
2424from zeroentropy import ZeroEntropy , AsyncZeroEntropy , APIResponseValidationError
2525from zeroentropy ._types import Omit
26+ from zeroentropy ._utils import maybe_transform
2627from zeroentropy ._models import BaseModel , FinalRequestOptions
2728from zeroentropy ._constants import RAW_RESPONSE_HEADER
2829from zeroentropy ._exceptions import APIStatusError , APITimeoutError , ZeroEntropyError , APIResponseValidationError
3233 BaseClient ,
3334 make_request_options ,
3435)
36+ from zeroentropy .types .status_get_status_params import StatusGetStatusParams
3537
3638from .utils import update_env
3739
@@ -727,7 +729,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
727729 with pytest .raises (APITimeoutError ):
728730 self .client .post (
729731 "/status/get-status" ,
730- body = cast (object , dict ()),
732+ body = cast (object , maybe_transform ( dict (), StatusGetStatusParams )),
731733 cast_to = httpx .Response ,
732734 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
733735 )
@@ -742,7 +744,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
742744 with pytest .raises (APIStatusError ):
743745 self .client .post (
744746 "/status/get-status" ,
745- body = cast (object , dict ()),
747+ body = cast (object , maybe_transform ( dict (), StatusGetStatusParams )),
746748 cast_to = httpx .Response ,
747749 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
748750 )
@@ -1503,7 +1505,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
15031505 with pytest .raises (APITimeoutError ):
15041506 await self .client .post (
15051507 "/status/get-status" ,
1506- body = cast (object , dict ()),
1508+ body = cast (object , maybe_transform ( dict (), StatusGetStatusParams )),
15071509 cast_to = httpx .Response ,
15081510 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
15091511 )
@@ -1518,7 +1520,7 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
15181520 with pytest .raises (APIStatusError ):
15191521 await self .client .post (
15201522 "/status/get-status" ,
1521- body = cast (object , dict ()),
1523+ body = cast (object , maybe_transform ( dict (), StatusGetStatusParams )),
15221524 cast_to = httpx .Response ,
15231525 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
15241526 )
0 commit comments