diff --git a/tests/test_client.py b/tests/test_client.py index 9d57b3d..628a8c1 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -23,6 +23,7 @@ from runwayml import RunwayML, AsyncRunwayML, APIResponseValidationError from runwayml._types import Omit +from runwayml._utils import maybe_transform from runwayml._models import BaseModel, FinalRequestOptions from runwayml._constants import RAW_RESPONSE_HEADER from runwayml._exceptions import RunwayMLError, APIStatusError, APITimeoutError, APIResponseValidationError @@ -32,6 +33,7 @@ BaseClient, make_request_options, ) +from runwayml.types.image_to_video_create_params import ImageToVideoCreateParams from .utils import update_env @@ -719,10 +721,13 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No "/v1/image_to_video", body=cast( object, - dict( - model="gen3a_turbo", - prompt_image="https://example.com/assets/bunny.jpg", - prompt_text="The bunny is eating a carrot", + maybe_transform( + dict( + model="gen3a_turbo", + prompt_image="https://example.com/assets/bunny.jpg", + prompt_text="The bunny is eating a carrot", + ), + ImageToVideoCreateParams, ), ), cast_to=httpx.Response, @@ -741,10 +746,13 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non "/v1/image_to_video", body=cast( object, - dict( - model="gen3a_turbo", - prompt_image="https://example.com/assets/bunny.jpg", - prompt_text="The bunny is eating a carrot", + maybe_transform( + dict( + model="gen3a_turbo", + prompt_image="https://example.com/assets/bunny.jpg", + prompt_text="The bunny is eating a carrot", + ), + ImageToVideoCreateParams, ), ), cast_to=httpx.Response, @@ -1515,10 +1523,13 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) "/v1/image_to_video", body=cast( object, - dict( - model="gen3a_turbo", - prompt_image="https://example.com/assets/bunny.jpg", - prompt_text="The bunny is eating a carrot", + maybe_transform( + dict( + model="gen3a_turbo", + prompt_image="https://example.com/assets/bunny.jpg", + prompt_text="The bunny is eating a carrot", + ), + ImageToVideoCreateParams, ), ), cast_to=httpx.Response, @@ -1537,10 +1548,13 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) "/v1/image_to_video", body=cast( object, - dict( - model="gen3a_turbo", - prompt_image="https://example.com/assets/bunny.jpg", - prompt_text="The bunny is eating a carrot", + maybe_transform( + dict( + model="gen3a_turbo", + prompt_image="https://example.com/assets/bunny.jpg", + prompt_text="The bunny is eating a carrot", + ), + ImageToVideoCreateParams, ), ), cast_to=httpx.Response,