@@ -27,20 +27,7 @@ class TestLockdowns:
27
27
def test_method_create (self , client : Cloudflare ) -> None :
28
28
lockdown = client .firewall .lockdowns .create (
29
29
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
30
- configurations = {},
31
- urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
32
- )
33
- assert_matches_type (Lockdown , lockdown , path = ["response" ])
34
-
35
- @pytest .mark .skip (reason = "TODO: investigate broken test" )
36
- @parametrize
37
- def test_method_create_with_all_params (self , client : Cloudflare ) -> None :
38
- lockdown = client .firewall .lockdowns .create (
39
- zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
40
- configurations = {
41
- "target" : "ip" ,
42
- "value" : "198.51.100.4" ,
43
- },
30
+ configurations = [{}, {}, {}],
44
31
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
45
32
)
46
33
assert_matches_type (Lockdown , lockdown , path = ["response" ])
@@ -50,7 +37,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
50
37
def test_raw_response_create (self , client : Cloudflare ) -> None :
51
38
response = client .firewall .lockdowns .with_raw_response .create (
52
39
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
53
- configurations = {} ,
40
+ configurations = [{}, {}, {}] ,
54
41
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
55
42
)
56
43
@@ -64,7 +51,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
64
51
def test_streaming_response_create (self , client : Cloudflare ) -> None :
65
52
with client .firewall .lockdowns .with_streaming_response .create (
66
53
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
67
- configurations = {} ,
54
+ configurations = [{}, {}, {}] ,
68
55
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
69
56
) as response :
70
57
assert not response .is_closed
@@ -81,7 +68,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
81
68
with pytest .raises (ValueError , match = r"Expected a non-empty value for `zone_id` but received ''" ):
82
69
client .firewall .lockdowns .with_raw_response .create (
83
70
zone_id = "" ,
84
- configurations = {} ,
71
+ configurations = [{}, {}, {}] ,
85
72
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
86
73
)
87
74
@@ -91,21 +78,7 @@ def test_method_update(self, client: Cloudflare) -> None:
91
78
lockdown = client .firewall .lockdowns .update (
92
79
lock_downs_id = "372e67954025e0ba6aaa6d586b9e0b59" ,
93
80
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
94
- configurations = {},
95
- urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
96
- )
97
- assert_matches_type (Lockdown , lockdown , path = ["response" ])
98
-
99
- @pytest .mark .skip (reason = "TODO: investigate broken test" )
100
- @parametrize
101
- def test_method_update_with_all_params (self , client : Cloudflare ) -> None :
102
- lockdown = client .firewall .lockdowns .update (
103
- lock_downs_id = "372e67954025e0ba6aaa6d586b9e0b59" ,
104
- zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
105
- configurations = {
106
- "target" : "ip" ,
107
- "value" : "198.51.100.4" ,
108
- },
81
+ configurations = [{}, {}, {}],
109
82
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
110
83
)
111
84
assert_matches_type (Lockdown , lockdown , path = ["response" ])
@@ -116,7 +89,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
116
89
response = client .firewall .lockdowns .with_raw_response .update (
117
90
lock_downs_id = "372e67954025e0ba6aaa6d586b9e0b59" ,
118
91
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
119
- configurations = {} ,
92
+ configurations = [{}, {}, {}] ,
120
93
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
121
94
)
122
95
@@ -131,7 +104,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
131
104
with client .firewall .lockdowns .with_streaming_response .update (
132
105
lock_downs_id = "372e67954025e0ba6aaa6d586b9e0b59" ,
133
106
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
134
- configurations = {} ,
107
+ configurations = [{}, {}, {}] ,
135
108
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
136
109
) as response :
137
110
assert not response .is_closed
@@ -149,15 +122,15 @@ def test_path_params_update(self, client: Cloudflare) -> None:
149
122
client .firewall .lockdowns .with_raw_response .update (
150
123
lock_downs_id = "372e67954025e0ba6aaa6d586b9e0b59" ,
151
124
zone_id = "" ,
152
- configurations = {} ,
125
+ configurations = [{}, {}, {}] ,
153
126
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
154
127
)
155
128
156
129
with pytest .raises (ValueError , match = r"Expected a non-empty value for `lock_downs_id` but received ''" ):
157
130
client .firewall .lockdowns .with_raw_response .update (
158
131
lock_downs_id = "" ,
159
132
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
160
- configurations = {} ,
133
+ configurations = [{}, {}, {}] ,
161
134
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
162
135
)
163
136
@@ -322,20 +295,7 @@ class TestAsyncLockdowns:
322
295
async def test_method_create (self , async_client : AsyncCloudflare ) -> None :
323
296
lockdown = await async_client .firewall .lockdowns .create (
324
297
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
325
- configurations = {},
326
- urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
327
- )
328
- assert_matches_type (Lockdown , lockdown , path = ["response" ])
329
-
330
- @pytest .mark .skip (reason = "TODO: investigate broken test" )
331
- @parametrize
332
- async def test_method_create_with_all_params (self , async_client : AsyncCloudflare ) -> None :
333
- lockdown = await async_client .firewall .lockdowns .create (
334
- zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
335
- configurations = {
336
- "target" : "ip" ,
337
- "value" : "198.51.100.4" ,
338
- },
298
+ configurations = [{}, {}, {}],
339
299
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
340
300
)
341
301
assert_matches_type (Lockdown , lockdown , path = ["response" ])
@@ -345,7 +305,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
345
305
async def test_raw_response_create (self , async_client : AsyncCloudflare ) -> None :
346
306
response = await async_client .firewall .lockdowns .with_raw_response .create (
347
307
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
348
- configurations = {} ,
308
+ configurations = [{}, {}, {}] ,
349
309
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
350
310
)
351
311
@@ -359,7 +319,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
359
319
async def test_streaming_response_create (self , async_client : AsyncCloudflare ) -> None :
360
320
async with async_client .firewall .lockdowns .with_streaming_response .create (
361
321
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
362
- configurations = {} ,
322
+ configurations = [{}, {}, {}] ,
363
323
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
364
324
) as response :
365
325
assert not response .is_closed
@@ -376,7 +336,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
376
336
with pytest .raises (ValueError , match = r"Expected a non-empty value for `zone_id` but received ''" ):
377
337
await async_client .firewall .lockdowns .with_raw_response .create (
378
338
zone_id = "" ,
379
- configurations = {} ,
339
+ configurations = [{}, {}, {}] ,
380
340
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
381
341
)
382
342
@@ -386,21 +346,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
386
346
lockdown = await async_client .firewall .lockdowns .update (
387
347
lock_downs_id = "372e67954025e0ba6aaa6d586b9e0b59" ,
388
348
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
389
- configurations = {},
390
- urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
391
- )
392
- assert_matches_type (Lockdown , lockdown , path = ["response" ])
393
-
394
- @pytest .mark .skip (reason = "TODO: investigate broken test" )
395
- @parametrize
396
- async def test_method_update_with_all_params (self , async_client : AsyncCloudflare ) -> None :
397
- lockdown = await async_client .firewall .lockdowns .update (
398
- lock_downs_id = "372e67954025e0ba6aaa6d586b9e0b59" ,
399
- zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
400
- configurations = {
401
- "target" : "ip" ,
402
- "value" : "198.51.100.4" ,
403
- },
349
+ configurations = [{}, {}, {}],
404
350
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
405
351
)
406
352
assert_matches_type (Lockdown , lockdown , path = ["response" ])
@@ -411,7 +357,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
411
357
response = await async_client .firewall .lockdowns .with_raw_response .update (
412
358
lock_downs_id = "372e67954025e0ba6aaa6d586b9e0b59" ,
413
359
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
414
- configurations = {} ,
360
+ configurations = [{}, {}, {}] ,
415
361
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
416
362
)
417
363
@@ -426,7 +372,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
426
372
async with async_client .firewall .lockdowns .with_streaming_response .update (
427
373
lock_downs_id = "372e67954025e0ba6aaa6d586b9e0b59" ,
428
374
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
429
- configurations = {} ,
375
+ configurations = [{}, {}, {}] ,
430
376
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
431
377
) as response :
432
378
assert not response .is_closed
@@ -444,15 +390,15 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
444
390
await async_client .firewall .lockdowns .with_raw_response .update (
445
391
lock_downs_id = "372e67954025e0ba6aaa6d586b9e0b59" ,
446
392
zone_id = "" ,
447
- configurations = {} ,
393
+ configurations = [{}, {}, {}] ,
448
394
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
449
395
)
450
396
451
397
with pytest .raises (ValueError , match = r"Expected a non-empty value for `lock_downs_id` but received ''" ):
452
398
await async_client .firewall .lockdowns .with_raw_response .update (
453
399
lock_downs_id = "" ,
454
400
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
455
- configurations = {} ,
401
+ configurations = [{}, {}, {}] ,
456
402
urls = ["shop.example.com/*" , "shop.example.com/*" , "shop.example.com/*" ],
457
403
)
458
404
0 commit comments