@@ -721,7 +721,13 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
721721 with pytest .raises (APITimeoutError ):
722722 self .client .post (
723723 "/browsers" ,
724- body = cast (object , maybe_transform (dict (invocation_id = "REPLACE_ME" ), BrowserCreateParams )),
724+ body = cast (
725+ object ,
726+ maybe_transform (
727+ dict (invocation_id = "REPLACE_ME" , persistence = {"id" : "browser-for-user-1234" }),
728+ BrowserCreateParams ,
729+ ),
730+ ),
725731 cast_to = httpx .Response ,
726732 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
727733 )
@@ -737,7 +743,13 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
737743 with pytest .raises (APIStatusError ):
738744 self .client .post (
739745 "/browsers" ,
740- body = cast (object , maybe_transform (dict (invocation_id = "REPLACE_ME" ), BrowserCreateParams )),
746+ body = cast (
747+ object ,
748+ maybe_transform (
749+ dict (invocation_id = "REPLACE_ME" , persistence = {"id" : "browser-for-user-1234" }),
750+ BrowserCreateParams ,
751+ ),
752+ ),
741753 cast_to = httpx .Response ,
742754 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
743755 )
@@ -1513,7 +1525,13 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
15131525 with pytest .raises (APITimeoutError ):
15141526 await self .client .post (
15151527 "/browsers" ,
1516- body = cast (object , maybe_transform (dict (invocation_id = "REPLACE_ME" ), BrowserCreateParams )),
1528+ body = cast (
1529+ object ,
1530+ maybe_transform (
1531+ dict (invocation_id = "REPLACE_ME" , persistence = {"id" : "browser-for-user-1234" }),
1532+ BrowserCreateParams ,
1533+ ),
1534+ ),
15171535 cast_to = httpx .Response ,
15181536 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
15191537 )
@@ -1529,7 +1547,13 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
15291547 with pytest .raises (APIStatusError ):
15301548 await self .client .post (
15311549 "/browsers" ,
1532- body = cast (object , maybe_transform (dict (invocation_id = "REPLACE_ME" ), BrowserCreateParams )),
1550+ body = cast (
1551+ object ,
1552+ maybe_transform (
1553+ dict (invocation_id = "REPLACE_ME" , persistence = {"id" : "browser-for-user-1234" }),
1554+ BrowserCreateParams ,
1555+ ),
1556+ ),
15331557 cast_to = httpx .Response ,
15341558 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
15351559 )
0 commit comments