9
9
10
10
from cloudflare import Cloudflare , AsyncCloudflare
11
11
from tests .utils import assert_matches_type
12
- from cloudflare .pagination import SyncV4PagePagination , AsyncV4PagePagination
12
+ from cloudflare .pagination import SyncV4PagePaginationArray , AsyncV4PagePaginationArray
13
13
from cloudflare .types .workflows import VersionGetResponse , VersionListResponse
14
14
15
15
base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
@@ -24,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None:
24
24
workflow_name = "x" ,
25
25
account_id = "account_id" ,
26
26
)
27
- assert_matches_type (SyncV4PagePagination [VersionListResponse ], version , path = ["response" ])
27
+ assert_matches_type (SyncV4PagePaginationArray [VersionListResponse ], version , path = ["response" ])
28
28
29
29
@parametrize
30
30
def test_method_list_with_all_params (self , client : Cloudflare ) -> None :
@@ -34,7 +34,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
34
34
page = 1 ,
35
35
per_page = 1 ,
36
36
)
37
- assert_matches_type (SyncV4PagePagination [VersionListResponse ], version , path = ["response" ])
37
+ assert_matches_type (SyncV4PagePaginationArray [VersionListResponse ], version , path = ["response" ])
38
38
39
39
@parametrize
40
40
def test_raw_response_list (self , client : Cloudflare ) -> None :
@@ -46,7 +46,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
46
46
assert response .is_closed is True
47
47
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
48
48
version = response .parse ()
49
- assert_matches_type (SyncV4PagePagination [VersionListResponse ], version , path = ["response" ])
49
+ assert_matches_type (SyncV4PagePaginationArray [VersionListResponse ], version , path = ["response" ])
50
50
51
51
@parametrize
52
52
def test_streaming_response_list (self , client : Cloudflare ) -> None :
@@ -58,7 +58,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
58
58
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
59
59
60
60
version = response .parse ()
61
- assert_matches_type (SyncV4PagePagination [VersionListResponse ], version , path = ["response" ])
61
+ assert_matches_type (SyncV4PagePaginationArray [VersionListResponse ], version , path = ["response" ])
62
62
63
63
assert cast (Any , response .is_closed ) is True
64
64
@@ -146,7 +146,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
146
146
workflow_name = "x" ,
147
147
account_id = "account_id" ,
148
148
)
149
- assert_matches_type (AsyncV4PagePagination [VersionListResponse ], version , path = ["response" ])
149
+ assert_matches_type (AsyncV4PagePaginationArray [VersionListResponse ], version , path = ["response" ])
150
150
151
151
@parametrize
152
152
async def test_method_list_with_all_params (self , async_client : AsyncCloudflare ) -> None :
@@ -156,7 +156,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
156
156
page = 1 ,
157
157
per_page = 1 ,
158
158
)
159
- assert_matches_type (AsyncV4PagePagination [VersionListResponse ], version , path = ["response" ])
159
+ assert_matches_type (AsyncV4PagePaginationArray [VersionListResponse ], version , path = ["response" ])
160
160
161
161
@parametrize
162
162
async def test_raw_response_list (self , async_client : AsyncCloudflare ) -> None :
@@ -168,7 +168,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
168
168
assert response .is_closed is True
169
169
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
170
170
version = await response .parse ()
171
- assert_matches_type (AsyncV4PagePagination [VersionListResponse ], version , path = ["response" ])
171
+ assert_matches_type (AsyncV4PagePaginationArray [VersionListResponse ], version , path = ["response" ])
172
172
173
173
@parametrize
174
174
async def test_streaming_response_list (self , async_client : AsyncCloudflare ) -> None :
@@ -180,7 +180,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
180
180
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
181
181
182
182
version = await response .parse ()
183
- assert_matches_type (AsyncV4PagePagination [VersionListResponse ], version , path = ["response" ])
183
+ assert_matches_type (AsyncV4PagePaginationArray [VersionListResponse ], version , path = ["response" ])
184
184
185
185
assert cast (Any , response .is_closed ) is True
186
186
0 commit comments