3
3
from __future__ import annotations
4
4
5
5
import os
6
- from typing import Any , cast
6
+ from typing import Any , Optional , cast
7
7
8
8
import pytest
9
9
@@ -24,7 +24,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
24
24
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
25
25
body = {},
26
26
)
27
- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
27
+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
28
28
29
29
@pytest .mark .skip ()
30
30
@parametrize
@@ -37,7 +37,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
37
37
assert response .is_closed is True
38
38
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
39
39
dnssec = response .parse ()
40
- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
40
+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
41
41
42
42
@pytest .mark .skip ()
43
43
@parametrize
@@ -50,7 +50,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
50
50
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
51
51
52
52
dnssec = response .parse ()
53
- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
53
+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
54
54
55
55
assert cast (Any , response .is_closed ) is True
56
56
@@ -69,7 +69,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
69
69
dnssec = client .dnssec .edit (
70
70
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
71
71
)
72
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
72
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
73
73
74
74
@pytest .mark .skip ()
75
75
@parametrize
@@ -80,7 +80,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
80
80
dnssec_presigned = True ,
81
81
status = "active" ,
82
82
)
83
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
83
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
84
84
85
85
@pytest .mark .skip ()
86
86
@parametrize
@@ -92,7 +92,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
92
92
assert response .is_closed is True
93
93
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
94
94
dnssec = response .parse ()
95
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
95
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
96
96
97
97
@pytest .mark .skip ()
98
98
@parametrize
@@ -104,7 +104,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
104
104
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
105
105
106
106
dnssec = response .parse ()
107
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
107
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
108
108
109
109
assert cast (Any , response .is_closed ) is True
110
110
@@ -122,7 +122,7 @@ def test_method_get(self, client: Cloudflare) -> None:
122
122
dnssec = client .dnssec .get (
123
123
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
124
124
)
125
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
125
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
126
126
127
127
@pytest .mark .skip ()
128
128
@parametrize
@@ -134,7 +134,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
134
134
assert response .is_closed is True
135
135
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
136
136
dnssec = response .parse ()
137
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
137
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
138
138
139
139
@pytest .mark .skip ()
140
140
@parametrize
@@ -146,7 +146,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
146
146
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
147
147
148
148
dnssec = response .parse ()
149
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
149
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
150
150
151
151
assert cast (Any , response .is_closed ) is True
152
152
@@ -169,7 +169,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
169
169
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
170
170
body = {},
171
171
)
172
- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
172
+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
173
173
174
174
@pytest .mark .skip ()
175
175
@parametrize
@@ -182,7 +182,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
182
182
assert response .is_closed is True
183
183
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
184
184
dnssec = await response .parse ()
185
- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
185
+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
186
186
187
187
@pytest .mark .skip ()
188
188
@parametrize
@@ -195,7 +195,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
195
195
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
196
196
197
197
dnssec = await response .parse ()
198
- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
198
+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
199
199
200
200
assert cast (Any , response .is_closed ) is True
201
201
@@ -214,7 +214,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
214
214
dnssec = await async_client .dnssec .edit (
215
215
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
216
216
)
217
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
217
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
218
218
219
219
@pytest .mark .skip ()
220
220
@parametrize
@@ -225,7 +225,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
225
225
dnssec_presigned = True ,
226
226
status = "active" ,
227
227
)
228
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
228
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
229
229
230
230
@pytest .mark .skip ()
231
231
@parametrize
@@ -237,7 +237,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
237
237
assert response .is_closed is True
238
238
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
239
239
dnssec = await response .parse ()
240
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
240
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
241
241
242
242
@pytest .mark .skip ()
243
243
@parametrize
@@ -249,7 +249,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
249
249
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
250
250
251
251
dnssec = await response .parse ()
252
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
252
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
253
253
254
254
assert cast (Any , response .is_closed ) is True
255
255
@@ -267,7 +267,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
267
267
dnssec = await async_client .dnssec .get (
268
268
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
269
269
)
270
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
270
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
271
271
272
272
@pytest .mark .skip ()
273
273
@parametrize
@@ -279,7 +279,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
279
279
assert response .is_closed is True
280
280
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
281
281
dnssec = await response .parse ()
282
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
282
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
283
283
284
284
@pytest .mark .skip ()
285
285
@parametrize
@@ -291,7 +291,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
291
291
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
292
292
293
293
dnssec = await response .parse ()
294
- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
294
+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
295
295
296
296
assert cast (Any , response .is_closed ) is True
297
297
0 commit comments