@@ -100,11 +100,15 @@ def test_get_pets(self, spec):
100
100
with pytest .warns (
101
101
DeprecationWarning , match = "limit parameter is deprecated"
102
102
):
103
- result = unmarshal_request (
104
- request ,
105
- spec = spec ,
106
- cls = V30RequestParametersUnmarshaller ,
107
- )
103
+ with pytest .warns (
104
+ DeprecationWarning ,
105
+ match = "Use of allowEmptyValue property is deprecated" ,
106
+ ):
107
+ result = unmarshal_request (
108
+ request ,
109
+ spec = spec ,
110
+ cls = V30RequestParametersUnmarshaller ,
111
+ )
108
112
109
113
assert result .parameters == Parameters (
110
114
query = {
@@ -159,11 +163,15 @@ def test_get_pets_response(self, spec):
159
163
with pytest .warns (
160
164
DeprecationWarning , match = "limit parameter is deprecated"
161
165
):
162
- result = unmarshal_request (
163
- request ,
164
- spec = spec ,
165
- cls = V30RequestParametersUnmarshaller ,
166
- )
166
+ with pytest .warns (
167
+ DeprecationWarning ,
168
+ match = "Use of allowEmptyValue property is deprecated" ,
169
+ ):
170
+ result = unmarshal_request (
171
+ request ,
172
+ spec = spec ,
173
+ cls = V30RequestParametersUnmarshaller ,
174
+ )
167
175
168
176
assert result .parameters == Parameters (
169
177
query = {
@@ -219,11 +227,15 @@ def test_get_pets_response_media_type(self, spec):
219
227
with pytest .warns (
220
228
DeprecationWarning , match = "limit parameter is deprecated"
221
229
):
222
- result = unmarshal_request (
223
- request ,
224
- spec = spec ,
225
- cls = V30RequestParametersUnmarshaller ,
226
- )
230
+ with pytest .warns (
231
+ DeprecationWarning ,
232
+ match = "Use of allowEmptyValue property is deprecated" ,
233
+ ):
234
+ result = unmarshal_request (
235
+ request ,
236
+ spec = spec ,
237
+ cls = V30RequestParametersUnmarshaller ,
238
+ )
227
239
228
240
assert result .parameters == Parameters (
229
241
query = {
@@ -267,11 +279,15 @@ def test_get_pets_invalid_response(self, spec, response_unmarshaller):
267
279
with pytest .warns (
268
280
DeprecationWarning , match = "limit parameter is deprecated"
269
281
):
270
- result = unmarshal_request (
271
- request ,
272
- spec = spec ,
273
- cls = V30RequestParametersUnmarshaller ,
274
- )
282
+ with pytest .warns (
283
+ DeprecationWarning ,
284
+ match = "Use of allowEmptyValue property is deprecated" ,
285
+ ):
286
+ result = unmarshal_request (
287
+ request ,
288
+ spec = spec ,
289
+ cls = V30RequestParametersUnmarshaller ,
290
+ )
275
291
276
292
assert result .parameters == Parameters (
277
293
query = {
@@ -339,11 +355,15 @@ def test_get_pets_ids_param(self, spec):
339
355
with pytest .warns (
340
356
DeprecationWarning , match = "limit parameter is deprecated"
341
357
):
342
- result = unmarshal_request (
343
- request ,
344
- spec = spec ,
345
- cls = V30RequestParametersUnmarshaller ,
346
- )
358
+ with pytest .warns (
359
+ DeprecationWarning ,
360
+ match = "Use of allowEmptyValue property is deprecated" ,
361
+ ):
362
+ result = unmarshal_request (
363
+ request ,
364
+ spec = spec ,
365
+ cls = V30RequestParametersUnmarshaller ,
366
+ )
347
367
348
368
assert result .parameters == Parameters (
349
369
query = {
@@ -391,11 +411,15 @@ def test_get_pets_tags_param(self, spec):
391
411
with pytest .warns (
392
412
DeprecationWarning , match = "limit parameter is deprecated"
393
413
):
394
- result = unmarshal_request (
395
- request ,
396
- spec = spec ,
397
- cls = V30RequestParametersUnmarshaller ,
398
- )
414
+ with pytest .warns (
415
+ DeprecationWarning ,
416
+ match = "Use of allowEmptyValue property is deprecated" ,
417
+ ):
418
+ result = unmarshal_request (
419
+ request ,
420
+ spec = spec ,
421
+ cls = V30RequestParametersUnmarshaller ,
422
+ )
399
423
400
424
assert result .parameters == Parameters (
401
425
query = {
@@ -443,12 +467,16 @@ def test_get_pets_parameter_schema_error(self, spec):
443
467
with pytest .warns (
444
468
DeprecationWarning , match = "limit parameter is deprecated"
445
469
):
446
- with pytest .raises (ParameterValidationError ) as exc_info :
447
- validate_request (
448
- request ,
449
- spec = spec ,
450
- cls = V30RequestParametersUnmarshaller ,
451
- )
470
+ with pytest .warns (
471
+ DeprecationWarning ,
472
+ match = "Use of allowEmptyValue property is deprecated" ,
473
+ ):
474
+ with pytest .raises (ParameterValidationError ) as exc_info :
475
+ validate_request (
476
+ request ,
477
+ spec = spec ,
478
+ cls = V30RequestParametersUnmarshaller ,
479
+ )
452
480
assert type (exc_info .value .__cause__ ) is InvalidSchemaValue
453
481
454
482
result = unmarshal_request (
@@ -475,12 +503,16 @@ def test_get_pets_wrong_parameter_type(self, spec):
475
503
with pytest .warns (
476
504
DeprecationWarning , match = "limit parameter is deprecated"
477
505
):
478
- with pytest .raises (ParameterValidationError ) as exc_info :
479
- validate_request (
480
- request ,
481
- spec = spec ,
482
- cls = V30RequestParametersValidator ,
483
- )
506
+ with pytest .warns (
507
+ DeprecationWarning ,
508
+ match = "Use of allowEmptyValue property is deprecated" ,
509
+ ):
510
+ with pytest .raises (ParameterValidationError ) as exc_info :
511
+ validate_request (
512
+ request ,
513
+ spec = spec ,
514
+ cls = V30RequestParametersValidator ,
515
+ )
484
516
assert type (exc_info .value .__cause__ ) is CastError
485
517
486
518
result = unmarshal_request (
@@ -502,12 +534,16 @@ def test_get_pets_raises_missing_required_param(self, spec):
502
534
with pytest .warns (
503
535
DeprecationWarning , match = "limit parameter is deprecated"
504
536
):
505
- with pytest .raises (MissingRequiredParameter ):
506
- validate_request (
507
- request ,
508
- spec = spec ,
509
- cls = V30RequestParametersValidator ,
510
- )
537
+ with pytest .warns (
538
+ DeprecationWarning ,
539
+ match = "Use of allowEmptyValue property is deprecated" ,
540
+ ):
541
+ with pytest .raises (MissingRequiredParameter ):
542
+ validate_request (
543
+ request ,
544
+ spec = spec ,
545
+ cls = V30RequestParametersValidator ,
546
+ )
511
547
512
548
result = unmarshal_request (
513
549
request , spec = spec , cls = V30RequestBodyUnmarshaller
@@ -534,12 +570,16 @@ def test_get_pets_empty_value(self, spec):
534
570
with pytest .warns (
535
571
DeprecationWarning , match = "limit parameter is deprecated"
536
572
):
537
- with pytest .raises (ParameterValidationError ) as exc_info :
538
- validate_request (
539
- request ,
540
- spec = spec ,
541
- cls = V30RequestParametersValidator ,
542
- )
573
+ with pytest .warns (
574
+ DeprecationWarning ,
575
+ match = "Use of allowEmptyValue property is deprecated" ,
576
+ ):
577
+ with pytest .raises (ParameterValidationError ) as exc_info :
578
+ validate_request (
579
+ request ,
580
+ spec = spec ,
581
+ cls = V30RequestParametersValidator ,
582
+ )
543
583
assert type (exc_info .value .__cause__ ) is EmptyQueryParameterValue
544
584
545
585
result = unmarshal_request (
@@ -567,11 +607,15 @@ def test_get_pets_allow_empty_value(self, spec):
567
607
with pytest .warns (
568
608
DeprecationWarning , match = "limit parameter is deprecated"
569
609
):
570
- result = unmarshal_request (
571
- request ,
572
- spec = spec ,
573
- cls = V30RequestParametersUnmarshaller ,
574
- )
610
+ with pytest .warns (
611
+ DeprecationWarning ,
612
+ match = "Use of allowEmptyValue property is deprecated" ,
613
+ ):
614
+ result = unmarshal_request (
615
+ request ,
616
+ spec = spec ,
617
+ cls = V30RequestParametersUnmarshaller ,
618
+ )
575
619
576
620
assert result .parameters == Parameters (
577
621
query = {
@@ -605,11 +649,15 @@ def test_get_pets_none_value(self, spec):
605
649
with pytest .warns (
606
650
DeprecationWarning , match = "limit parameter is deprecated"
607
651
):
608
- result = unmarshal_request (
609
- request ,
610
- spec = spec ,
611
- cls = V30RequestParametersUnmarshaller ,
612
- )
652
+ with pytest .warns (
653
+ DeprecationWarning ,
654
+ match = "Use of allowEmptyValue property is deprecated" ,
655
+ ):
656
+ result = unmarshal_request (
657
+ request ,
658
+ spec = spec ,
659
+ cls = V30RequestParametersUnmarshaller ,
660
+ )
613
661
614
662
assert result .parameters == Parameters (
615
663
query = {
@@ -644,11 +692,15 @@ def test_get_pets_param_order(self, spec):
644
692
with pytest .warns (
645
693
DeprecationWarning , match = "limit parameter is deprecated"
646
694
):
647
- result = unmarshal_request (
648
- request ,
649
- spec = spec ,
650
- cls = V30RequestParametersUnmarshaller ,
651
- )
695
+ with pytest .warns (
696
+ DeprecationWarning ,
697
+ match = "Use of allowEmptyValue property is deprecated" ,
698
+ ):
699
+ result = unmarshal_request (
700
+ request ,
701
+ spec = spec ,
702
+ cls = V30RequestParametersUnmarshaller ,
703
+ )
652
704
653
705
assert result .parameters == Parameters (
654
706
query = {
@@ -688,11 +740,15 @@ def test_get_pets_param_coordinates(self, spec):
688
740
with pytest .warns (
689
741
DeprecationWarning , match = "limit parameter is deprecated"
690
742
):
691
- result = unmarshal_request (
692
- request ,
693
- spec = spec ,
694
- cls = V30RequestParametersUnmarshaller ,
695
- )
743
+ with pytest .warns (
744
+ DeprecationWarning ,
745
+ match = "Use of allowEmptyValue property is deprecated" ,
746
+ ):
747
+ result = unmarshal_request (
748
+ request ,
749
+ spec = spec ,
750
+ cls = V30RequestParametersUnmarshaller ,
751
+ )
696
752
697
753
assert is_dataclass (result .parameters .query ["coordinates" ])
698
754
assert (
0 commit comments