@@ -806,9 +806,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, clien
806806 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = httpx .TimeoutException ("Test timeout error" ))
807807
808808 with pytest .raises (APITimeoutError ):
809- client .files .with_streaming_response .upload (
810- file = "https://www.example.com/path/to-image.jpg" , file_name = "fileName"
811- ).__enter__ ()
809+ client .files .with_streaming_response .upload (file = "file" , file_name = "fileName" ).__enter__ ()
812810
813811 assert _get_open_connections (self .client ) == 0
814812
@@ -818,9 +816,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client
818816 respx_mock .post ("/api/v1/files/upload" ).mock (return_value = httpx .Response (500 ))
819817
820818 with pytest .raises (APIStatusError ):
821- client .files .with_streaming_response .upload (
822- file = "https://www.example.com/path/to-image.jpg" , file_name = "fileName"
823- ).__enter__ ()
819+ client .files .with_streaming_response .upload (file = "file" , file_name = "fileName" ).__enter__ ()
824820 assert _get_open_connections (self .client ) == 0
825821
826822 @pytest .mark .parametrize ("failures_before_success" , [0 , 2 , 4 ])
@@ -849,9 +845,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
849845
850846 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
851847
852- response = client .files .with_raw_response .upload (
853- file = "https://www.example.com/path/to-image.jpg" , file_name = "fileName"
854- )
848+ response = client .files .with_raw_response .upload (file = "file" , file_name = "fileName" )
855849
856850 assert response .retries_taken == failures_before_success
857851 assert int (response .http_request .headers .get ("x-stainless-retry-count" )) == failures_before_success
@@ -876,9 +870,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
876870 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
877871
878872 response = client .files .with_raw_response .upload (
879- file = "https://www.example.com/path/to-image.jpg" ,
880- file_name = "fileName" ,
881- extra_headers = {"x-stainless-retry-count" : Omit ()},
873+ file = "file" , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : Omit ()}
882874 )
883875
884876 assert len (response .http_request .headers .get_list ("x-stainless-retry-count" )) == 0
@@ -903,9 +895,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
903895 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
904896
905897 response = client .files .with_raw_response .upload (
906- file = "https://www.example.com/path/to-image.jpg" ,
907- file_name = "fileName" ,
908- extra_headers = {"x-stainless-retry-count" : "42" },
898+ file = "file" , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : "42" }
909899 )
910900
911901 assert response .http_request .headers .get ("x-stainless-retry-count" ) == "42"
@@ -1715,9 +1705,7 @@ async def test_retrying_timeout_errors_doesnt_leak(
17151705 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = httpx .TimeoutException ("Test timeout error" ))
17161706
17171707 with pytest .raises (APITimeoutError ):
1718- await async_client .files .with_streaming_response .upload (
1719- file = "https://www.example.com/path/to-image.jpg" , file_name = "fileName"
1720- ).__aenter__ ()
1708+ await async_client .files .with_streaming_response .upload (file = "file" , file_name = "fileName" ).__aenter__ ()
17211709
17221710 assert _get_open_connections (self .client ) == 0
17231711
@@ -1729,9 +1717,7 @@ async def test_retrying_status_errors_doesnt_leak(
17291717 respx_mock .post ("/api/v1/files/upload" ).mock (return_value = httpx .Response (500 ))
17301718
17311719 with pytest .raises (APIStatusError ):
1732- await async_client .files .with_streaming_response .upload (
1733- file = "https://www.example.com/path/to-image.jpg" , file_name = "fileName"
1734- ).__aenter__ ()
1720+ await async_client .files .with_streaming_response .upload (file = "file" , file_name = "fileName" ).__aenter__ ()
17351721 assert _get_open_connections (self .client ) == 0
17361722
17371723 @pytest .mark .parametrize ("failures_before_success" , [0 , 2 , 4 ])
@@ -1761,9 +1747,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
17611747
17621748 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
17631749
1764- response = await client .files .with_raw_response .upload (
1765- file = "https://www.example.com/path/to-image.jpg" , file_name = "fileName"
1766- )
1750+ response = await client .files .with_raw_response .upload (file = "file" , file_name = "fileName" )
17671751
17681752 assert response .retries_taken == failures_before_success
17691753 assert int (response .http_request .headers .get ("x-stainless-retry-count" )) == failures_before_success
@@ -1789,9 +1773,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
17891773 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
17901774
17911775 response = await client .files .with_raw_response .upload (
1792- file = "https://www.example.com/path/to-image.jpg" ,
1793- file_name = "fileName" ,
1794- extra_headers = {"x-stainless-retry-count" : Omit ()},
1776+ file = "file" , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : Omit ()}
17951777 )
17961778
17971779 assert len (response .http_request .headers .get_list ("x-stainless-retry-count" )) == 0
@@ -1817,9 +1799,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
18171799 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
18181800
18191801 response = await client .files .with_raw_response .upload (
1820- file = "https://www.example.com/path/to-image.jpg" ,
1821- file_name = "fileName" ,
1822- extra_headers = {"x-stainless-retry-count" : "42" },
1802+ file = "file" , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : "42" }
18231803 )
18241804
18251805 assert response .http_request .headers .get ("x-stainless-retry-count" ) == "42"
0 commit comments