@@ -938,7 +938,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, clien
938938 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = httpx .TimeoutException ("Test timeout error" ))
939939
940940 with pytest .raises (APITimeoutError ):
941- client .files .with_streaming_response .upload (file = b"raw file contents " , file_name = "fileName" ).__enter__ ()
941+ client .files .with_streaming_response .upload (file = b"Example data " , file_name = "fileName" ).__enter__ ()
942942
943943 assert _get_open_connections (client ) == 0
944944
@@ -948,7 +948,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client
948948 respx_mock .post ("/api/v1/files/upload" ).mock (return_value = httpx .Response (500 ))
949949
950950 with pytest .raises (APIStatusError ):
951- client .files .with_streaming_response .upload (file = b"raw file contents " , file_name = "fileName" ).__enter__ ()
951+ client .files .with_streaming_response .upload (file = b"Example data " , file_name = "fileName" ).__enter__ ()
952952 assert _get_open_connections (client ) == 0
953953
954954 @pytest .mark .parametrize ("failures_before_success" , [0 , 2 , 4 ])
@@ -977,7 +977,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
977977
978978 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
979979
980- response = client .files .with_raw_response .upload (file = b"raw file contents " , file_name = "fileName" )
980+ response = client .files .with_raw_response .upload (file = b"Example data " , file_name = "fileName" )
981981
982982 assert response .retries_taken == failures_before_success
983983 assert int (response .http_request .headers .get ("x-stainless-retry-count" )) == failures_before_success
@@ -1002,7 +1002,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
10021002 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
10031003
10041004 response = client .files .with_raw_response .upload (
1005- file = b"raw file contents " , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : Omit ()}
1005+ file = b"Example data " , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : Omit ()}
10061006 )
10071007
10081008 assert len (response .http_request .headers .get_list ("x-stainless-retry-count" )) == 0
@@ -1027,7 +1027,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
10271027 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
10281028
10291029 response = client .files .with_raw_response .upload (
1030- file = b"raw file contents " , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : "42" }
1030+ file = b"Example data " , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : "42" }
10311031 )
10321032
10331033 assert response .http_request .headers .get ("x-stainless-retry-count" ) == "42"
@@ -1926,7 +1926,7 @@ async def test_retrying_timeout_errors_doesnt_leak(
19261926
19271927 with pytest .raises (APITimeoutError ):
19281928 await async_client .files .with_streaming_response .upload (
1929- file = b"raw file contents " , file_name = "fileName"
1929+ file = b"Example data " , file_name = "fileName"
19301930 ).__aenter__ ()
19311931
19321932 assert _get_open_connections (async_client ) == 0
@@ -1940,7 +1940,7 @@ async def test_retrying_status_errors_doesnt_leak(
19401940
19411941 with pytest .raises (APIStatusError ):
19421942 await async_client .files .with_streaming_response .upload (
1943- file = b"raw file contents " , file_name = "fileName"
1943+ file = b"Example data " , file_name = "fileName"
19441944 ).__aenter__ ()
19451945 assert _get_open_connections (async_client ) == 0
19461946
@@ -1970,7 +1970,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
19701970
19711971 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
19721972
1973- response = await client .files .with_raw_response .upload (file = b"raw file contents " , file_name = "fileName" )
1973+ response = await client .files .with_raw_response .upload (file = b"Example data " , file_name = "fileName" )
19741974
19751975 assert response .retries_taken == failures_before_success
19761976 assert int (response .http_request .headers .get ("x-stainless-retry-count" )) == failures_before_success
@@ -1995,7 +1995,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
19951995 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
19961996
19971997 response = await client .files .with_raw_response .upload (
1998- file = b"raw file contents " , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : Omit ()}
1998+ file = b"Example data " , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : Omit ()}
19991999 )
20002000
20012001 assert len (response .http_request .headers .get_list ("x-stainless-retry-count" )) == 0
@@ -2020,7 +2020,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
20202020 respx_mock .post ("/api/v1/files/upload" ).mock (side_effect = retry_handler )
20212021
20222022 response = await client .files .with_raw_response .upload (
2023- file = b"raw file contents " , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : "42" }
2023+ file = b"Example data " , file_name = "fileName" , extra_headers = {"x-stainless-retry-count" : "42" }
20242024 )
20252025
20262026 assert response .http_request .headers .get ("x-stainless-retry-count" ) == "42"
0 commit comments