1616 ResourceGroupDeleteResponse ,
1717 ResourceGroupUpdateResponse ,
1818)
19- from cloudflare .pagination import SyncV4PagePaginationArray , AsyncV4PagePaginationArray
19+ from cloudflare .pagination import SyncSinglePage , AsyncSinglePage
2020
2121base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
2222
@@ -148,18 +148,16 @@ def test_method_list(self, client: Cloudflare) -> None:
148148 resource_group = client .iam .resource_groups .list (
149149 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
150150 )
151- assert_matches_type (SyncV4PagePaginationArray [ResourceGroupListResponse ], resource_group , path = ["response" ])
151+ assert_matches_type (SyncSinglePage [ResourceGroupListResponse ], resource_group , path = ["response" ])
152152
153153 @parametrize
154154 def test_method_list_with_all_params (self , client : Cloudflare ) -> None :
155155 resource_group = client .iam .resource_groups .list (
156156 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
157157 id = "023e105f4ecef8ad9ca31a8372d0c353" ,
158158 name = "NameOfTheResourceGroup" ,
159- page = 1 ,
160- per_page = 5 ,
161159 )
162- assert_matches_type (SyncV4PagePaginationArray [ResourceGroupListResponse ], resource_group , path = ["response" ])
160+ assert_matches_type (SyncSinglePage [ResourceGroupListResponse ], resource_group , path = ["response" ])
163161
164162 @parametrize
165163 def test_raw_response_list (self , client : Cloudflare ) -> None :
@@ -170,7 +168,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
170168 assert response .is_closed is True
171169 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
172170 resource_group = response .parse ()
173- assert_matches_type (SyncV4PagePaginationArray [ResourceGroupListResponse ], resource_group , path = ["response" ])
171+ assert_matches_type (SyncSinglePage [ResourceGroupListResponse ], resource_group , path = ["response" ])
174172
175173 @parametrize
176174 def test_streaming_response_list (self , client : Cloudflare ) -> None :
@@ -181,7 +179,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
181179 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
182180
183181 resource_group = response .parse ()
184- assert_matches_type (SyncV4PagePaginationArray [ResourceGroupListResponse ], resource_group , path = ["response" ])
182+ assert_matches_type (SyncSinglePage [ResourceGroupListResponse ], resource_group , path = ["response" ])
185183
186184 assert cast (Any , response .is_closed ) is True
187185
@@ -418,18 +416,16 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
418416 resource_group = await async_client .iam .resource_groups .list (
419417 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
420418 )
421- assert_matches_type (AsyncV4PagePaginationArray [ResourceGroupListResponse ], resource_group , path = ["response" ])
419+ assert_matches_type (AsyncSinglePage [ResourceGroupListResponse ], resource_group , path = ["response" ])
422420
423421 @parametrize
424422 async def test_method_list_with_all_params (self , async_client : AsyncCloudflare ) -> None :
425423 resource_group = await async_client .iam .resource_groups .list (
426424 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
427425 id = "023e105f4ecef8ad9ca31a8372d0c353" ,
428426 name = "NameOfTheResourceGroup" ,
429- page = 1 ,
430- per_page = 5 ,
431427 )
432- assert_matches_type (AsyncV4PagePaginationArray [ResourceGroupListResponse ], resource_group , path = ["response" ])
428+ assert_matches_type (AsyncSinglePage [ResourceGroupListResponse ], resource_group , path = ["response" ])
433429
434430 @parametrize
435431 async def test_raw_response_list (self , async_client : AsyncCloudflare ) -> None :
@@ -440,7 +436,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
440436 assert response .is_closed is True
441437 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
442438 resource_group = await response .parse ()
443- assert_matches_type (AsyncV4PagePaginationArray [ResourceGroupListResponse ], resource_group , path = ["response" ])
439+ assert_matches_type (AsyncSinglePage [ResourceGroupListResponse ], resource_group , path = ["response" ])
444440
445441 @parametrize
446442 async def test_streaming_response_list (self , async_client : AsyncCloudflare ) -> None :
@@ -451,9 +447,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
451447 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
452448
453449 resource_group = await response .parse ()
454- assert_matches_type (
455- AsyncV4PagePaginationArray [ResourceGroupListResponse ], resource_group , path = ["response" ]
456- )
450+ assert_matches_type (AsyncSinglePage [ResourceGroupListResponse ], resource_group , path = ["response" ])
457451
458452 assert cast (Any , response .is_closed ) is True
459453
0 commit comments