@@ -270,30 +270,35 @@ def test_streaming_response_get_requests_series(self, client: Gcore) -> None:
270270
271271 @parametrize
272272 def test_method_get_traffic_series (self , client : Gcore ) -> None :
273- statistic = client .waap .domains .statistics .get_traffic_series (
274- domain_id = 1 ,
275- resolution = "daily" ,
276- start = "2024-04-13T00:00:00+01:00" ,
277- )
273+ with pytest .warns (DeprecationWarning ):
274+ statistic = client .waap .domains .statistics .get_traffic_series (
275+ domain_id = 1 ,
276+ resolution = "daily" ,
277+ start = "2024-04-13T00:00:00+01:00" ,
278+ )
279+
278280 assert_matches_type (StatisticGetTrafficSeriesResponse , statistic , path = ["response" ])
279281
280282 @parametrize
281283 def test_method_get_traffic_series_with_all_params (self , client : Gcore ) -> None :
282- statistic = client .waap .domains .statistics .get_traffic_series (
283- domain_id = 1 ,
284- resolution = "daily" ,
285- start = "2024-04-13T00:00:00+01:00" ,
286- end = "2024-04-14T12:00:00Z" ,
287- )
284+ with pytest .warns (DeprecationWarning ):
285+ statistic = client .waap .domains .statistics .get_traffic_series (
286+ domain_id = 1 ,
287+ resolution = "daily" ,
288+ start = "2024-04-13T00:00:00+01:00" ,
289+ end = "2024-04-14T12:00:00Z" ,
290+ )
291+
288292 assert_matches_type (StatisticGetTrafficSeriesResponse , statistic , path = ["response" ])
289293
290294 @parametrize
291295 def test_raw_response_get_traffic_series (self , client : Gcore ) -> None :
292- response = client .waap .domains .statistics .with_raw_response .get_traffic_series (
293- domain_id = 1 ,
294- resolution = "daily" ,
295- start = "2024-04-13T00:00:00+01:00" ,
296- )
296+ with pytest .warns (DeprecationWarning ):
297+ response = client .waap .domains .statistics .with_raw_response .get_traffic_series (
298+ domain_id = 1 ,
299+ resolution = "daily" ,
300+ start = "2024-04-13T00:00:00+01:00" ,
301+ )
297302
298303 assert response .is_closed is True
299304 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -302,16 +307,17 @@ def test_raw_response_get_traffic_series(self, client: Gcore) -> None:
302307
303308 @parametrize
304309 def test_streaming_response_get_traffic_series (self , client : Gcore ) -> None :
305- with client .waap .domains .statistics .with_streaming_response .get_traffic_series (
306- domain_id = 1 ,
307- resolution = "daily" ,
308- start = "2024-04-13T00:00:00+01:00" ,
309- ) as response :
310- assert not response .is_closed
311- assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
310+ with pytest .warns (DeprecationWarning ):
311+ with client .waap .domains .statistics .with_streaming_response .get_traffic_series (
312+ domain_id = 1 ,
313+ resolution = "daily" ,
314+ start = "2024-04-13T00:00:00+01:00" ,
315+ ) as response :
316+ assert not response .is_closed
317+ assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
312318
313- statistic = response .parse ()
314- assert_matches_type (StatisticGetTrafficSeriesResponse , statistic , path = ["response" ])
319+ statistic = response .parse ()
320+ assert_matches_type (StatisticGetTrafficSeriesResponse , statistic , path = ["response" ])
315321
316322 assert cast (Any , response .is_closed ) is True
317323
@@ -563,30 +569,35 @@ async def test_streaming_response_get_requests_series(self, async_client: AsyncG
563569
564570 @parametrize
565571 async def test_method_get_traffic_series (self , async_client : AsyncGcore ) -> None :
566- statistic = await async_client .waap .domains .statistics .get_traffic_series (
567- domain_id = 1 ,
568- resolution = "daily" ,
569- start = "2024-04-13T00:00:00+01:00" ,
570- )
572+ with pytest .warns (DeprecationWarning ):
573+ statistic = await async_client .waap .domains .statistics .get_traffic_series (
574+ domain_id = 1 ,
575+ resolution = "daily" ,
576+ start = "2024-04-13T00:00:00+01:00" ,
577+ )
578+
571579 assert_matches_type (StatisticGetTrafficSeriesResponse , statistic , path = ["response" ])
572580
573581 @parametrize
574582 async def test_method_get_traffic_series_with_all_params (self , async_client : AsyncGcore ) -> None :
575- statistic = await async_client .waap .domains .statistics .get_traffic_series (
576- domain_id = 1 ,
577- resolution = "daily" ,
578- start = "2024-04-13T00:00:00+01:00" ,
579- end = "2024-04-14T12:00:00Z" ,
580- )
583+ with pytest .warns (DeprecationWarning ):
584+ statistic = await async_client .waap .domains .statistics .get_traffic_series (
585+ domain_id = 1 ,
586+ resolution = "daily" ,
587+ start = "2024-04-13T00:00:00+01:00" ,
588+ end = "2024-04-14T12:00:00Z" ,
589+ )
590+
581591 assert_matches_type (StatisticGetTrafficSeriesResponse , statistic , path = ["response" ])
582592
583593 @parametrize
584594 async def test_raw_response_get_traffic_series (self , async_client : AsyncGcore ) -> None :
585- response = await async_client .waap .domains .statistics .with_raw_response .get_traffic_series (
586- domain_id = 1 ,
587- resolution = "daily" ,
588- start = "2024-04-13T00:00:00+01:00" ,
589- )
595+ with pytest .warns (DeprecationWarning ):
596+ response = await async_client .waap .domains .statistics .with_raw_response .get_traffic_series (
597+ domain_id = 1 ,
598+ resolution = "daily" ,
599+ start = "2024-04-13T00:00:00+01:00" ,
600+ )
590601
591602 assert response .is_closed is True
592603 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -595,15 +606,16 @@ async def test_raw_response_get_traffic_series(self, async_client: AsyncGcore) -
595606
596607 @parametrize
597608 async def test_streaming_response_get_traffic_series (self , async_client : AsyncGcore ) -> None :
598- async with async_client .waap .domains .statistics .with_streaming_response .get_traffic_series (
599- domain_id = 1 ,
600- resolution = "daily" ,
601- start = "2024-04-13T00:00:00+01:00" ,
602- ) as response :
603- assert not response .is_closed
604- assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
609+ with pytest .warns (DeprecationWarning ):
610+ async with async_client .waap .domains .statistics .with_streaming_response .get_traffic_series (
611+ domain_id = 1 ,
612+ resolution = "daily" ,
613+ start = "2024-04-13T00:00:00+01:00" ,
614+ ) as response :
615+ assert not response .is_closed
616+ assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
605617
606- statistic = await response .parse ()
607- assert_matches_type (StatisticGetTrafficSeriesResponse , statistic , path = ["response" ])
618+ statistic = await response .parse ()
619+ assert_matches_type (StatisticGetTrafficSeriesResponse , statistic , path = ["response" ])
608620
609621 assert cast (Any , response .is_closed ) is True
0 commit comments