33from __future__ import annotations
44
55import os
6- from typing import Any , cast
6+ from typing import Any , Optional , cast
77
88import pytest
99
@@ -24,7 +24,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
2424 zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
2525 body = {},
2626 )
27- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
27+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
2828
2929 @pytest .mark .skip ()
3030 @parametrize
@@ -37,7 +37,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
3737 assert response .is_closed is True
3838 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
3939 dnssec = response .parse ()
40- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
40+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
4141
4242 @pytest .mark .skip ()
4343 @parametrize
@@ -50,7 +50,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
5050 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
5151
5252 dnssec = response .parse ()
53- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
53+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
5454
5555 assert cast (Any , response .is_closed ) is True
5656
@@ -69,7 +69,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
6969 dnssec = client .dnssec .edit (
7070 zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
7171 )
72- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
72+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
7373
7474 @pytest .mark .skip ()
7575 @parametrize
@@ -80,7 +80,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
8080 dnssec_presigned = True ,
8181 status = "active" ,
8282 )
83- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
83+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
8484
8585 @pytest .mark .skip ()
8686 @parametrize
@@ -92,7 +92,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
9292 assert response .is_closed is True
9393 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
9494 dnssec = response .parse ()
95- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
95+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
9696
9797 @pytest .mark .skip ()
9898 @parametrize
@@ -104,7 +104,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
104104 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
105105
106106 dnssec = response .parse ()
107- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
107+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
108108
109109 assert cast (Any , response .is_closed ) is True
110110
@@ -122,7 +122,7 @@ def test_method_get(self, client: Cloudflare) -> None:
122122 dnssec = client .dnssec .get (
123123 zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
124124 )
125- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
125+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
126126
127127 @pytest .mark .skip ()
128128 @parametrize
@@ -134,7 +134,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
134134 assert response .is_closed is True
135135 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
136136 dnssec = response .parse ()
137- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
137+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
138138
139139 @pytest .mark .skip ()
140140 @parametrize
@@ -146,7 +146,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
146146 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
147147
148148 dnssec = response .parse ()
149- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
149+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
150150
151151 assert cast (Any , response .is_closed ) is True
152152
@@ -169,7 +169,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
169169 zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
170170 body = {},
171171 )
172- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
172+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
173173
174174 @pytest .mark .skip ()
175175 @parametrize
@@ -182,7 +182,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
182182 assert response .is_closed is True
183183 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
184184 dnssec = await response .parse ()
185- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
185+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
186186
187187 @pytest .mark .skip ()
188188 @parametrize
@@ -195,7 +195,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
195195 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
196196
197197 dnssec = await response .parse ()
198- assert_matches_type (DNSSECDeleteResponse , dnssec , path = ["response" ])
198+ assert_matches_type (Optional [ DNSSECDeleteResponse ] , dnssec , path = ["response" ])
199199
200200 assert cast (Any , response .is_closed ) is True
201201
@@ -214,7 +214,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
214214 dnssec = await async_client .dnssec .edit (
215215 zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
216216 )
217- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
217+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
218218
219219 @pytest .mark .skip ()
220220 @parametrize
@@ -225,7 +225,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
225225 dnssec_presigned = True ,
226226 status = "active" ,
227227 )
228- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
228+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
229229
230230 @pytest .mark .skip ()
231231 @parametrize
@@ -237,7 +237,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
237237 assert response .is_closed is True
238238 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
239239 dnssec = await response .parse ()
240- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
240+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
241241
242242 @pytest .mark .skip ()
243243 @parametrize
@@ -249,7 +249,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
249249 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
250250
251251 dnssec = await response .parse ()
252- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
252+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
253253
254254 assert cast (Any , response .is_closed ) is True
255255
@@ -267,7 +267,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
267267 dnssec = await async_client .dnssec .get (
268268 zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
269269 )
270- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
270+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
271271
272272 @pytest .mark .skip ()
273273 @parametrize
@@ -279,7 +279,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
279279 assert response .is_closed is True
280280 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
281281 dnssec = await response .parse ()
282- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
282+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
283283
284284 @pytest .mark .skip ()
285285 @parametrize
@@ -291,7 +291,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
291291 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
292292
293293 dnssec = await response .parse ()
294- assert_matches_type (DNSSEC , dnssec , path = ["response" ])
294+ assert_matches_type (Optional [ DNSSEC ] , dnssec , path = ["response" ])
295295
296296 assert cast (Any , response .is_closed ) is True
297297
0 commit comments