9
9
10
10
from cloudflare import Cloudflare, AsyncCloudflare
11
11
from tests.utils import assert_matches_type
12
- from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
13
12
from cloudflare.types.zero_trust.gateway import (
14
13
ProxyEndpoint,
14
+ ProxyEndpointGetResponse,
15
15
ProxyEndpointDeleteResponse,
16
16
)
17
17
@@ -72,7 +72,7 @@ def test_method_list(self, client: Cloudflare) -> None:
72
72
proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.list(
73
73
account_id="699d98642c564d2e855e9661899b7252",
74
74
)
75
- assert_matches_type(SyncSinglePage [ProxyEndpoint], proxy_endpoint, path=["response"])
75
+ assert_matches_type(Optional [ProxyEndpoint], proxy_endpoint, path=["response"])
76
76
77
77
@parametrize
78
78
def test_raw_response_list(self, client: Cloudflare) -> None:
@@ -83,7 +83,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
83
83
assert response.is_closed is True
84
84
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
85
85
proxy_endpoint = response.parse()
86
- assert_matches_type(SyncSinglePage [ProxyEndpoint], proxy_endpoint, path=["response"])
86
+ assert_matches_type(Optional [ProxyEndpoint], proxy_endpoint, path=["response"])
87
87
88
88
@parametrize
89
89
def test_streaming_response_list(self, client: Cloudflare) -> None:
@@ -94,7 +94,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
94
94
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
95
95
96
96
proxy_endpoint = response.parse()
97
- assert_matches_type(SyncSinglePage [ProxyEndpoint], proxy_endpoint, path=["response"])
97
+ assert_matches_type(Optional [ProxyEndpoint], proxy_endpoint, path=["response"])
98
98
99
99
assert cast(Any, response.is_closed) is True
100
100
@@ -217,7 +217,7 @@ def test_method_get(self, client: Cloudflare) -> None:
217
217
"ed35569b41ce4d1facfe683550f54086",
218
218
account_id="699d98642c564d2e855e9661899b7252",
219
219
)
220
- assert_matches_type(Optional[ProxyEndpoint ], proxy_endpoint, path=["response"])
220
+ assert_matches_type(Optional[ProxyEndpointGetResponse ], proxy_endpoint, path=["response"])
221
221
222
222
@parametrize
223
223
def test_raw_response_get(self, client: Cloudflare) -> None:
@@ -229,7 +229,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
229
229
assert response.is_closed is True
230
230
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
231
231
proxy_endpoint = response.parse()
232
- assert_matches_type(Optional[ProxyEndpoint ], proxy_endpoint, path=["response"])
232
+ assert_matches_type(Optional[ProxyEndpointGetResponse ], proxy_endpoint, path=["response"])
233
233
234
234
@parametrize
235
235
def test_streaming_response_get(self, client: Cloudflare) -> None:
@@ -241,7 +241,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
241
241
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
242
242
243
243
proxy_endpoint = response.parse()
244
- assert_matches_type(Optional[ProxyEndpoint ], proxy_endpoint, path=["response"])
244
+ assert_matches_type(Optional[ProxyEndpointGetResponse ], proxy_endpoint, path=["response"])
245
245
246
246
assert cast(Any, response.is_closed) is True
247
247
@@ -314,7 +314,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
314
314
proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.list(
315
315
account_id="699d98642c564d2e855e9661899b7252",
316
316
)
317
- assert_matches_type(AsyncSinglePage [ProxyEndpoint], proxy_endpoint, path=["response"])
317
+ assert_matches_type(Optional [ProxyEndpoint], proxy_endpoint, path=["response"])
318
318
319
319
@parametrize
320
320
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@@ -325,7 +325,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
325
325
assert response.is_closed is True
326
326
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
327
327
proxy_endpoint = await response.parse()
328
- assert_matches_type(AsyncSinglePage [ProxyEndpoint], proxy_endpoint, path=["response"])
328
+ assert_matches_type(Optional [ProxyEndpoint], proxy_endpoint, path=["response"])
329
329
330
330
@parametrize
331
331
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
@@ -336,7 +336,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
336
336
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
337
337
338
338
proxy_endpoint = await response.parse()
339
- assert_matches_type(AsyncSinglePage [ProxyEndpoint], proxy_endpoint, path=["response"])
339
+ assert_matches_type(Optional [ProxyEndpoint], proxy_endpoint, path=["response"])
340
340
341
341
assert cast(Any, response.is_closed) is True
342
342
@@ -459,7 +459,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
459
459
"ed35569b41ce4d1facfe683550f54086",
460
460
account_id="699d98642c564d2e855e9661899b7252",
461
461
)
462
- assert_matches_type(Optional[ProxyEndpoint ], proxy_endpoint, path=["response"])
462
+ assert_matches_type(Optional[ProxyEndpointGetResponse ], proxy_endpoint, path=["response"])
463
463
464
464
@parametrize
465
465
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -471,7 +471,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
471
471
assert response.is_closed is True
472
472
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
473
473
proxy_endpoint = await response.parse()
474
- assert_matches_type(Optional[ProxyEndpoint ], proxy_endpoint, path=["response"])
474
+ assert_matches_type(Optional[ProxyEndpointGetResponse ], proxy_endpoint, path=["response"])
475
475
476
476
@parametrize
477
477
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -483,7 +483,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
483
483
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
484
484
485
485
proxy_endpoint = await response.parse()
486
- assert_matches_type(Optional[ProxyEndpoint ], proxy_endpoint, path=["response"])
486
+ assert_matches_type(Optional[ProxyEndpointGetResponse ], proxy_endpoint, path=["response"])
487
487
488
488
assert cast(Any, response.is_closed) is True
489
489
0 commit comments