1414 Storage ,
1515)
1616
17+ # pyright: reportDeprecated=false
18+
1719base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
1820
1921
@@ -70,25 +72,30 @@ def test_streaming_response_create(self, client: Gcore) -> None:
7072
7173 @parametrize
7274 def test_method_update (self , client : Gcore ) -> None :
73- storage = client .storage .update (
74- storage_id = 0 ,
75- )
75+ with pytest .warns (DeprecationWarning ):
76+ storage = client .storage .update (
77+ storage_id = 0 ,
78+ )
79+
7680 assert_matches_type (Storage , storage , path = ["response" ])
7781
7882 @parametrize
7983 def test_method_update_with_all_params (self , client : Gcore ) -> None :
80- storage = client .storage .update (
81- storage_id = 0 ,
82- expires = "2026-12-31 23:59:59+00:00" ,
83- server_alias = "my-storage.company.com" ,
84- )
84+ with pytest .warns (DeprecationWarning ):
85+ storage = client .storage .update (
86+ storage_id = 0 ,
87+ expires = "2 years 6 months 2 weeks 3 days 5 hours 10 minutes 15 seconds" ,
88+ server_alias = "my-storage.company.com" ,
89+ )
90+
8591 assert_matches_type (Storage , storage , path = ["response" ])
8692
8793 @parametrize
8894 def test_raw_response_update (self , client : Gcore ) -> None :
89- response = client .storage .with_raw_response .update (
90- storage_id = 0 ,
91- )
95+ with pytest .warns (DeprecationWarning ):
96+ response = client .storage .with_raw_response .update (
97+ storage_id = 0 ,
98+ )
9299
93100 assert response .is_closed is True
94101 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -97,14 +104,15 @@ def test_raw_response_update(self, client: Gcore) -> None:
97104
98105 @parametrize
99106 def test_streaming_response_update (self , client : Gcore ) -> None :
100- with client .storage .with_streaming_response .update (
101- storage_id = 0 ,
102- ) as response :
103- assert not response .is_closed
104- assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
107+ with pytest .warns (DeprecationWarning ):
108+ with client .storage .with_streaming_response .update (
109+ storage_id = 0 ,
110+ ) as response :
111+ assert not response .is_closed
112+ assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
105113
106- storage = response .parse ()
107- assert_matches_type (Storage , storage , path = ["response" ])
114+ storage = response .parse ()
115+ assert_matches_type (Storage , storage , path = ["response" ])
108116
109117 assert cast (Any , response .is_closed ) is True
110118
@@ -374,25 +382,30 @@ async def test_streaming_response_create(self, async_client: AsyncGcore) -> None
374382
375383 @parametrize
376384 async def test_method_update (self , async_client : AsyncGcore ) -> None :
377- storage = await async_client .storage .update (
378- storage_id = 0 ,
379- )
385+ with pytest .warns (DeprecationWarning ):
386+ storage = await async_client .storage .update (
387+ storage_id = 0 ,
388+ )
389+
380390 assert_matches_type (Storage , storage , path = ["response" ])
381391
382392 @parametrize
383393 async def test_method_update_with_all_params (self , async_client : AsyncGcore ) -> None :
384- storage = await async_client .storage .update (
385- storage_id = 0 ,
386- expires = "2026-12-31 23:59:59+00:00" ,
387- server_alias = "my-storage.company.com" ,
388- )
394+ with pytest .warns (DeprecationWarning ):
395+ storage = await async_client .storage .update (
396+ storage_id = 0 ,
397+ expires = "2 years 6 months 2 weeks 3 days 5 hours 10 minutes 15 seconds" ,
398+ server_alias = "my-storage.company.com" ,
399+ )
400+
389401 assert_matches_type (Storage , storage , path = ["response" ])
390402
391403 @parametrize
392404 async def test_raw_response_update (self , async_client : AsyncGcore ) -> None :
393- response = await async_client .storage .with_raw_response .update (
394- storage_id = 0 ,
395- )
405+ with pytest .warns (DeprecationWarning ):
406+ response = await async_client .storage .with_raw_response .update (
407+ storage_id = 0 ,
408+ )
396409
397410 assert response .is_closed is True
398411 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -401,14 +414,15 @@ async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
401414
402415 @parametrize
403416 async def test_streaming_response_update (self , async_client : AsyncGcore ) -> None :
404- async with async_client .storage .with_streaming_response .update (
405- storage_id = 0 ,
406- ) as response :
407- assert not response .is_closed
408- assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
409-
410- storage = await response .parse ()
411- assert_matches_type (Storage , storage , path = ["response" ])
417+ with pytest .warns (DeprecationWarning ):
418+ async with async_client .storage .with_streaming_response .update (
419+ storage_id = 0 ,
420+ ) as response :
421+ assert not response .is_closed
422+ assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
423+
424+ storage = await response .parse ()
425+ assert_matches_type (Storage , storage , path = ["response" ])
412426
413427 assert cast (Any , response .is_closed ) is True
414428
0 commit comments