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
46 changes: 30 additions & 16 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,6 +33,7 @@
BaseClient,
make_request_options,
)
from runwayml.types.image_to_video_create_params import ImageToVideoCreateParams

from .utils import update_env

Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down