@@ -100,11 +100,15 @@ def test_get_pets(self, spec):
100100 with pytest .warns (
101101 DeprecationWarning , match = "limit parameter is deprecated"
102102 ):
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+ )
108112
109113 assert result .parameters == Parameters (
110114 query = {
@@ -159,11 +163,15 @@ def test_get_pets_response(self, spec):
159163 with pytest .warns (
160164 DeprecationWarning , match = "limit parameter is deprecated"
161165 ):
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+ )
167175
168176 assert result .parameters == Parameters (
169177 query = {
@@ -219,11 +227,15 @@ def test_get_pets_response_media_type(self, spec):
219227 with pytest .warns (
220228 DeprecationWarning , match = "limit parameter is deprecated"
221229 ):
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+ )
227239
228240 assert result .parameters == Parameters (
229241 query = {
@@ -267,11 +279,15 @@ def test_get_pets_invalid_response(self, spec, response_unmarshaller):
267279 with pytest .warns (
268280 DeprecationWarning , match = "limit parameter is deprecated"
269281 ):
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+ )
275291
276292 assert result .parameters == Parameters (
277293 query = {
@@ -339,11 +355,15 @@ def test_get_pets_ids_param(self, spec):
339355 with pytest .warns (
340356 DeprecationWarning , match = "limit parameter is deprecated"
341357 ):
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+ )
347367
348368 assert result .parameters == Parameters (
349369 query = {
@@ -391,11 +411,15 @@ def test_get_pets_tags_param(self, spec):
391411 with pytest .warns (
392412 DeprecationWarning , match = "limit parameter is deprecated"
393413 ):
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+ )
399423
400424 assert result .parameters == Parameters (
401425 query = {
@@ -443,12 +467,16 @@ def test_get_pets_parameter_schema_error(self, spec):
443467 with pytest .warns (
444468 DeprecationWarning , match = "limit parameter is deprecated"
445469 ):
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+ )
452480 assert type (exc_info .value .__cause__ ) is InvalidSchemaValue
453481
454482 result = unmarshal_request (
@@ -475,12 +503,16 @@ def test_get_pets_wrong_parameter_type(self, spec):
475503 with pytest .warns (
476504 DeprecationWarning , match = "limit parameter is deprecated"
477505 ):
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+ )
484516 assert type (exc_info .value .__cause__ ) is CastError
485517
486518 result = unmarshal_request (
@@ -502,12 +534,16 @@ def test_get_pets_raises_missing_required_param(self, spec):
502534 with pytest .warns (
503535 DeprecationWarning , match = "limit parameter is deprecated"
504536 ):
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+ )
511547
512548 result = unmarshal_request (
513549 request , spec = spec , cls = V30RequestBodyUnmarshaller
@@ -534,12 +570,16 @@ def test_get_pets_empty_value(self, spec):
534570 with pytest .warns (
535571 DeprecationWarning , match = "limit parameter is deprecated"
536572 ):
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+ )
543583 assert type (exc_info .value .__cause__ ) is EmptyQueryParameterValue
544584
545585 result = unmarshal_request (
@@ -567,11 +607,15 @@ def test_get_pets_allow_empty_value(self, spec):
567607 with pytest .warns (
568608 DeprecationWarning , match = "limit parameter is deprecated"
569609 ):
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+ )
575619
576620 assert result .parameters == Parameters (
577621 query = {
@@ -605,11 +649,15 @@ def test_get_pets_none_value(self, spec):
605649 with pytest .warns (
606650 DeprecationWarning , match = "limit parameter is deprecated"
607651 ):
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+ )
613661
614662 assert result .parameters == Parameters (
615663 query = {
@@ -644,11 +692,15 @@ def test_get_pets_param_order(self, spec):
644692 with pytest .warns (
645693 DeprecationWarning , match = "limit parameter is deprecated"
646694 ):
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+ )
652704
653705 assert result .parameters == Parameters (
654706 query = {
@@ -688,11 +740,15 @@ def test_get_pets_param_coordinates(self, spec):
688740 with pytest .warns (
689741 DeprecationWarning , match = "limit parameter is deprecated"
690742 ):
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+ )
696752
697753 assert is_dataclass (result .parameters .query ["coordinates" ])
698754 assert (
0 commit comments