10
10
from cloudflare import Cloudflare , AsyncCloudflare
11
11
from tests .utils import assert_matches_type
12
12
from cloudflare .pagination import SyncV4PagePaginationArray , AsyncV4PagePaginationArray
13
+ from cloudflare .types .api_gateway import DiscoveryOperation
13
14
from cloudflare .types .api_gateway .discovery import (
14
15
OperationEditResponse ,
15
- OperationListResponse ,
16
16
OperationBulkEditResponse ,
17
17
)
18
18
@@ -27,7 +27,7 @@ def test_method_list(self, client: Cloudflare) -> None:
27
27
operation = client .api_gateway .discovery .operations .list (
28
28
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
29
29
)
30
- assert_matches_type (SyncV4PagePaginationArray [OperationListResponse ], operation , path = ["response" ])
30
+ assert_matches_type (SyncV4PagePaginationArray [DiscoveryOperation ], operation , path = ["response" ])
31
31
32
32
@parametrize
33
33
def test_method_list_with_all_params (self , client : Cloudflare ) -> None :
@@ -44,7 +44,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
44
44
per_page = 5 ,
45
45
state = "review" ,
46
46
)
47
- assert_matches_type (SyncV4PagePaginationArray [OperationListResponse ], operation , path = ["response" ])
47
+ assert_matches_type (SyncV4PagePaginationArray [DiscoveryOperation ], operation , path = ["response" ])
48
48
49
49
@parametrize
50
50
def test_raw_response_list (self , client : Cloudflare ) -> None :
@@ -55,7 +55,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
55
55
assert response .is_closed is True
56
56
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
57
57
operation = response .parse ()
58
- assert_matches_type (SyncV4PagePaginationArray [OperationListResponse ], operation , path = ["response" ])
58
+ assert_matches_type (SyncV4PagePaginationArray [DiscoveryOperation ], operation , path = ["response" ])
59
59
60
60
@parametrize
61
61
def test_streaming_response_list (self , client : Cloudflare ) -> None :
@@ -66,7 +66,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
66
66
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
67
67
68
68
operation = response .parse ()
69
- assert_matches_type (SyncV4PagePaginationArray [OperationListResponse ], operation , path = ["response" ])
69
+ assert_matches_type (SyncV4PagePaginationArray [DiscoveryOperation ], operation , path = ["response" ])
70
70
71
71
assert cast (Any , response .is_closed ) is True
72
72
@@ -197,7 +197,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
197
197
operation = await async_client .api_gateway .discovery .operations .list (
198
198
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
199
199
)
200
- assert_matches_type (AsyncV4PagePaginationArray [OperationListResponse ], operation , path = ["response" ])
200
+ assert_matches_type (AsyncV4PagePaginationArray [DiscoveryOperation ], operation , path = ["response" ])
201
201
202
202
@parametrize
203
203
async def test_method_list_with_all_params (self , async_client : AsyncCloudflare ) -> None :
@@ -214,7 +214,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
214
214
per_page = 5 ,
215
215
state = "review" ,
216
216
)
217
- assert_matches_type (AsyncV4PagePaginationArray [OperationListResponse ], operation , path = ["response" ])
217
+ assert_matches_type (AsyncV4PagePaginationArray [DiscoveryOperation ], operation , path = ["response" ])
218
218
219
219
@parametrize
220
220
async def test_raw_response_list (self , async_client : AsyncCloudflare ) -> None :
@@ -225,7 +225,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
225
225
assert response .is_closed is True
226
226
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
227
227
operation = await response .parse ()
228
- assert_matches_type (AsyncV4PagePaginationArray [OperationListResponse ], operation , path = ["response" ])
228
+ assert_matches_type (AsyncV4PagePaginationArray [DiscoveryOperation ], operation , path = ["response" ])
229
229
230
230
@parametrize
231
231
async def test_streaming_response_list (self , async_client : AsyncCloudflare ) -> None :
@@ -236,7 +236,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
236
236
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
237
237
238
238
operation = await response .parse ()
239
- assert_matches_type (AsyncV4PagePaginationArray [OperationListResponse ], operation , path = ["response" ])
239
+ assert_matches_type (AsyncV4PagePaginationArray [DiscoveryOperation ], operation , path = ["response" ])
240
240
241
241
assert cast (Any , response .is_closed ) is True
242
242
0 commit comments