@@ -720,7 +720,13 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
720720 with pytest .raises (APITimeoutError ):
721721 self .client .post (
722722 "/browsers" ,
723- body = cast (object , maybe_transform (dict (invocation_id = "REPLACE_ME" ), BrowserCreateParams )),
723+ body = cast (
724+ object ,
725+ maybe_transform (
726+ dict (invocation_id = "REPLACE_ME" , persistence = {"id" : "browser-for-user-1234" }),
727+ BrowserCreateParams ,
728+ ),
729+ ),
724730 cast_to = httpx .Response ,
725731 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
726732 )
@@ -735,7 +741,13 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
735741 with pytest .raises (APIStatusError ):
736742 self .client .post (
737743 "/browsers" ,
738- body = cast (object , maybe_transform (dict (invocation_id = "REPLACE_ME" ), BrowserCreateParams )),
744+ body = cast (
745+ object ,
746+ maybe_transform (
747+ dict (invocation_id = "REPLACE_ME" , persistence = {"id" : "browser-for-user-1234" }),
748+ BrowserCreateParams ,
749+ ),
750+ ),
739751 cast_to = httpx .Response ,
740752 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
741753 )
@@ -1510,7 +1522,13 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
15101522 with pytest .raises (APITimeoutError ):
15111523 await self .client .post (
15121524 "/browsers" ,
1513- body = cast (object , maybe_transform (dict (invocation_id = "REPLACE_ME" ), BrowserCreateParams )),
1525+ body = cast (
1526+ object ,
1527+ maybe_transform (
1528+ dict (invocation_id = "REPLACE_ME" , persistence = {"id" : "browser-for-user-1234" }),
1529+ BrowserCreateParams ,
1530+ ),
1531+ ),
15141532 cast_to = httpx .Response ,
15151533 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
15161534 )
@@ -1525,7 +1543,13 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
15251543 with pytest .raises (APIStatusError ):
15261544 await self .client .post (
15271545 "/browsers" ,
1528- body = cast (object , maybe_transform (dict (invocation_id = "REPLACE_ME" ), BrowserCreateParams )),
1546+ body = cast (
1547+ object ,
1548+ maybe_transform (
1549+ dict (invocation_id = "REPLACE_ME" , persistence = {"id" : "browser-for-user-1234" }),
1550+ BrowserCreateParams ,
1551+ ),
1552+ ),
15291553 cast_to = httpx .Response ,
15301554 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
15311555 )
0 commit comments