Skip to content

Commit

Permalink
chore(internal): cast type in mocked test (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Jan 29, 2024
1 parent da133ec commit 579cda7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
with pytest.raises(APITimeoutError):
self.client.post(
"/customers",
body=dict(email="example-customer@withorb.com", name="My Customer"),
body=cast(object, dict(email="example-customer@withorb.com", name="My Customer")),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand All @@ -727,7 +727,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
with pytest.raises(APIStatusError):
self.client.post(
"/customers",
body=dict(email="example-customer@withorb.com", name="My Customer"),
body=cast(object, dict(email="example-customer@withorb.com", name="My Customer")),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand Down Expand Up @@ -1416,7 +1416,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
with pytest.raises(APITimeoutError):
await self.client.post(
"/customers",
body=dict(email="example-customer@withorb.com", name="My Customer"),
body=cast(object, dict(email="example-customer@withorb.com", name="My Customer")),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand All @@ -1431,7 +1431,7 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
with pytest.raises(APIStatusError):
await self.client.post(
"/customers",
body=dict(email="example-customer@withorb.com", name="My Customer"),
body=cast(object, dict(email="example-customer@withorb.com", name="My Customer")),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand Down

0 comments on commit 579cda7

Please sign in to comment.