@@ -854,7 +854,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, clien
854854 respx_mock .get ("/brand/retrieve" ).mock (side_effect = httpx .TimeoutException ("Test timeout error" ))
855855
856856 with pytest .raises (APITimeoutError ):
857- client .brand .with_streaming_response .retrieve ().__enter__ ()
857+ client .brand .with_streaming_response .retrieve (domain = "domain" ).__enter__ ()
858858
859859 assert _get_open_connections (client ) == 0
860860
@@ -864,7 +864,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client
864864 respx_mock .get ("/brand/retrieve" ).mock (return_value = httpx .Response (500 ))
865865
866866 with pytest .raises (APIStatusError ):
867- client .brand .with_streaming_response .retrieve ().__enter__ ()
867+ client .brand .with_streaming_response .retrieve (domain = "domain" ).__enter__ ()
868868 assert _get_open_connections (client ) == 0
869869
870870 @pytest .mark .parametrize ("failures_before_success" , [0 , 2 , 4 ])
@@ -893,7 +893,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
893893
894894 respx_mock .get ("/brand/retrieve" ).mock (side_effect = retry_handler )
895895
896- response = client .brand .with_raw_response .retrieve ()
896+ response = client .brand .with_raw_response .retrieve (domain = "domain" )
897897
898898 assert response .retries_taken == failures_before_success
899899 assert int (response .http_request .headers .get ("x-stainless-retry-count" )) == failures_before_success
@@ -917,7 +917,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
917917
918918 respx_mock .get ("/brand/retrieve" ).mock (side_effect = retry_handler )
919919
920- response = client .brand .with_raw_response .retrieve (extra_headers = {"x-stainless-retry-count" : Omit ()})
920+ response = client .brand .with_raw_response .retrieve (
921+ domain = "domain" , extra_headers = {"x-stainless-retry-count" : Omit ()}
922+ )
921923
922924 assert len (response .http_request .headers .get_list ("x-stainless-retry-count" )) == 0
923925
@@ -940,7 +942,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
940942
941943 respx_mock .get ("/brand/retrieve" ).mock (side_effect = retry_handler )
942944
943- response = client .brand .with_raw_response .retrieve (extra_headers = {"x-stainless-retry-count" : "42" })
945+ response = client .brand .with_raw_response .retrieve (
946+ domain = "domain" , extra_headers = {"x-stainless-retry-count" : "42" }
947+ )
944948
945949 assert response .http_request .headers .get ("x-stainless-retry-count" ) == "42"
946950
@@ -1754,7 +1758,7 @@ async def test_retrying_timeout_errors_doesnt_leak(
17541758 respx_mock .get ("/brand/retrieve" ).mock (side_effect = httpx .TimeoutException ("Test timeout error" ))
17551759
17561760 with pytest .raises (APITimeoutError ):
1757- await async_client .brand .with_streaming_response .retrieve ().__aenter__ ()
1761+ await async_client .brand .with_streaming_response .retrieve (domain = "domain" ).__aenter__ ()
17581762
17591763 assert _get_open_connections (async_client ) == 0
17601764
@@ -1766,7 +1770,7 @@ async def test_retrying_status_errors_doesnt_leak(
17661770 respx_mock .get ("/brand/retrieve" ).mock (return_value = httpx .Response (500 ))
17671771
17681772 with pytest .raises (APIStatusError ):
1769- await async_client .brand .with_streaming_response .retrieve ().__aenter__ ()
1773+ await async_client .brand .with_streaming_response .retrieve (domain = "domain" ).__aenter__ ()
17701774 assert _get_open_connections (async_client ) == 0
17711775
17721776 @pytest .mark .parametrize ("failures_before_success" , [0 , 2 , 4 ])
@@ -1795,7 +1799,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
17951799
17961800 respx_mock .get ("/brand/retrieve" ).mock (side_effect = retry_handler )
17971801
1798- response = await client .brand .with_raw_response .retrieve ()
1802+ response = await client .brand .with_raw_response .retrieve (domain = "domain" )
17991803
18001804 assert response .retries_taken == failures_before_success
18011805 assert int (response .http_request .headers .get ("x-stainless-retry-count" )) == failures_before_success
@@ -1819,7 +1823,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
18191823
18201824 respx_mock .get ("/brand/retrieve" ).mock (side_effect = retry_handler )
18211825
1822- response = await client .brand .with_raw_response .retrieve (extra_headers = {"x-stainless-retry-count" : Omit ()})
1826+ response = await client .brand .with_raw_response .retrieve (
1827+ domain = "domain" , extra_headers = {"x-stainless-retry-count" : Omit ()}
1828+ )
18231829
18241830 assert len (response .http_request .headers .get_list ("x-stainless-retry-count" )) == 0
18251831
@@ -1842,7 +1848,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
18421848
18431849 respx_mock .get ("/brand/retrieve" ).mock (side_effect = retry_handler )
18441850
1845- response = await client .brand .with_raw_response .retrieve (extra_headers = {"x-stainless-retry-count" : "42" })
1851+ response = await client .brand .with_raw_response .retrieve (
1852+ domain = "domain" , extra_headers = {"x-stainless-retry-count" : "42" }
1853+ )
18461854
18471855 assert response .http_request .headers .get ("x-stainless-retry-count" ) == "42"
18481856
0 commit comments