@@ -98,11 +98,14 @@ def test_get_pets(self, spec):
98
98
args = query_params ,
99
99
)
100
100
101
- result = unmarshal_request (
102
- request ,
103
- spec = spec ,
104
- cls = V30RequestParametersUnmarshaller ,
105
- )
101
+ with pytest .warns (
102
+ DeprecationWarning , match = "limit parameter is deprecated"
103
+ ):
104
+ result = unmarshal_request (
105
+ request ,
106
+ spec = spec ,
107
+ cls = V30RequestParametersUnmarshaller ,
108
+ )
106
109
107
110
assert result .parameters == Parameters (
108
111
query = {
@@ -154,11 +157,14 @@ def test_get_pets_response(self, spec):
154
157
args = query_params ,
155
158
)
156
159
157
- result = unmarshal_request (
158
- request ,
159
- spec = spec ,
160
- cls = V30RequestParametersUnmarshaller ,
161
- )
160
+ with pytest .warns (
161
+ DeprecationWarning , match = "limit parameter is deprecated"
162
+ ):
163
+ result = unmarshal_request (
164
+ request ,
165
+ spec = spec ,
166
+ cls = V30RequestParametersUnmarshaller ,
167
+ )
162
168
163
169
assert result .parameters == Parameters (
164
170
query = {
@@ -211,11 +217,14 @@ def test_get_pets_response_media_type(self, spec):
211
217
args = query_params ,
212
218
)
213
219
214
- result = unmarshal_request (
215
- request ,
216
- spec = spec ,
217
- cls = V30RequestParametersUnmarshaller ,
218
- )
220
+ with pytest .warns (
221
+ DeprecationWarning , match = "limit parameter is deprecated"
222
+ ):
223
+ result = unmarshal_request (
224
+ request ,
225
+ spec = spec ,
226
+ cls = V30RequestParametersUnmarshaller ,
227
+ )
219
228
220
229
assert result .parameters == Parameters (
221
230
query = {
@@ -256,11 +265,14 @@ def test_get_pets_invalid_response(self, spec, response_unmarshaller):
256
265
args = query_params ,
257
266
)
258
267
259
- result = unmarshal_request (
260
- request ,
261
- spec = spec ,
262
- cls = V30RequestParametersUnmarshaller ,
263
- )
268
+ with pytest .warns (
269
+ DeprecationWarning , match = "limit parameter is deprecated"
270
+ ):
271
+ result = unmarshal_request (
272
+ request ,
273
+ spec = spec ,
274
+ cls = V30RequestParametersUnmarshaller ,
275
+ )
264
276
265
277
assert result .parameters == Parameters (
266
278
query = {
@@ -325,11 +337,14 @@ def test_get_pets_ids_param(self, spec):
325
337
args = query_params ,
326
338
)
327
339
328
- result = unmarshal_request (
329
- request ,
330
- spec = spec ,
331
- cls = V30RequestParametersUnmarshaller ,
332
- )
340
+ with pytest .warns (
341
+ DeprecationWarning , match = "limit parameter is deprecated"
342
+ ):
343
+ result = unmarshal_request (
344
+ request ,
345
+ spec = spec ,
346
+ cls = V30RequestParametersUnmarshaller ,
347
+ )
333
348
334
349
assert result .parameters == Parameters (
335
350
query = {
@@ -374,11 +389,14 @@ def test_get_pets_tags_param(self, spec):
374
389
args = query_params ,
375
390
)
376
391
377
- result = unmarshal_request (
378
- request ,
379
- spec = spec ,
380
- cls = V30RequestParametersUnmarshaller ,
381
- )
392
+ with pytest .warns (
393
+ DeprecationWarning , match = "limit parameter is deprecated"
394
+ ):
395
+ result = unmarshal_request (
396
+ request ,
397
+ spec = spec ,
398
+ cls = V30RequestParametersUnmarshaller ,
399
+ )
382
400
383
401
assert result .parameters == Parameters (
384
402
query = {
@@ -423,12 +441,15 @@ def test_get_pets_parameter_schema_error(self, spec):
423
441
args = query_params ,
424
442
)
425
443
426
- with pytest .raises (ParameterValidationError ) as exc_info :
427
- validate_request (
428
- request ,
429
- spec = spec ,
430
- cls = V30RequestParametersUnmarshaller ,
431
- )
444
+ with pytest .warns (
445
+ DeprecationWarning , match = "limit parameter is deprecated"
446
+ ):
447
+ with pytest .raises (ParameterValidationError ) as exc_info :
448
+ validate_request (
449
+ request ,
450
+ spec = spec ,
451
+ cls = V30RequestParametersUnmarshaller ,
452
+ )
432
453
assert type (exc_info .value .__cause__ ) is InvalidSchemaValue
433
454
434
455
result = unmarshal_request (
@@ -452,12 +473,15 @@ def test_get_pets_wrong_parameter_type(self, spec):
452
473
args = query_params ,
453
474
)
454
475
455
- with pytest .raises (ParameterValidationError ) as exc_info :
456
- validate_request (
457
- request ,
458
- spec = spec ,
459
- cls = V30RequestParametersValidator ,
460
- )
476
+ with pytest .warns (
477
+ DeprecationWarning , match = "limit parameter is deprecated"
478
+ ):
479
+ with pytest .raises (ParameterValidationError ) as exc_info :
480
+ validate_request (
481
+ request ,
482
+ spec = spec ,
483
+ cls = V30RequestParametersValidator ,
484
+ )
461
485
assert type (exc_info .value .__cause__ ) is CastError
462
486
463
487
result = unmarshal_request (
@@ -476,12 +500,15 @@ def test_get_pets_raises_missing_required_param(self, spec):
476
500
path_pattern = path_pattern ,
477
501
)
478
502
479
- with pytest .raises (MissingRequiredParameter ):
480
- validate_request (
481
- request ,
482
- spec = spec ,
483
- cls = V30RequestParametersValidator ,
484
- )
503
+ with pytest .warns (
504
+ DeprecationWarning , match = "limit parameter is deprecated"
505
+ ):
506
+ with pytest .raises (MissingRequiredParameter ):
507
+ validate_request (
508
+ request ,
509
+ spec = spec ,
510
+ cls = V30RequestParametersValidator ,
511
+ )
485
512
486
513
result = unmarshal_request (
487
514
request , spec = spec , cls = V30RequestBodyUnmarshaller
@@ -505,12 +532,15 @@ def test_get_pets_empty_value(self, spec):
505
532
args = query_params ,
506
533
)
507
534
508
- with pytest .raises (ParameterValidationError ) as exc_info :
509
- validate_request (
510
- request ,
511
- spec = spec ,
512
- cls = V30RequestParametersValidator ,
513
- )
535
+ with pytest .warns (
536
+ DeprecationWarning , match = "limit parameter is deprecated"
537
+ ):
538
+ with pytest .raises (ParameterValidationError ) as exc_info :
539
+ validate_request (
540
+ request ,
541
+ spec = spec ,
542
+ cls = V30RequestParametersValidator ,
543
+ )
514
544
assert type (exc_info .value .__cause__ ) is EmptyQueryParameterValue
515
545
516
546
result = unmarshal_request (
@@ -535,11 +565,14 @@ def test_get_pets_allow_empty_value(self, spec):
535
565
args = query_params ,
536
566
)
537
567
538
- result = unmarshal_request (
539
- request ,
540
- spec = spec ,
541
- cls = V30RequestParametersUnmarshaller ,
542
- )
568
+ with pytest .warns (
569
+ DeprecationWarning , match = "limit parameter is deprecated"
570
+ ):
571
+ result = unmarshal_request (
572
+ request ,
573
+ spec = spec ,
574
+ cls = V30RequestParametersUnmarshaller ,
575
+ )
543
576
544
577
assert result .parameters == Parameters (
545
578
query = {
@@ -570,11 +603,14 @@ def test_get_pets_none_value(self, spec):
570
603
args = query_params ,
571
604
)
572
605
573
- result = unmarshal_request (
574
- request ,
575
- spec = spec ,
576
- cls = V30RequestParametersUnmarshaller ,
577
- )
606
+ with pytest .warns (
607
+ DeprecationWarning , match = "limit parameter is deprecated"
608
+ ):
609
+ result = unmarshal_request (
610
+ request ,
611
+ spec = spec ,
612
+ cls = V30RequestParametersUnmarshaller ,
613
+ )
578
614
579
615
assert result .parameters == Parameters (
580
616
query = {
@@ -606,11 +642,14 @@ def test_get_pets_param_order(self, spec):
606
642
args = query_params ,
607
643
)
608
644
609
- result = unmarshal_request (
610
- request ,
611
- spec = spec ,
612
- cls = V30RequestParametersUnmarshaller ,
613
- )
645
+ with pytest .warns (
646
+ DeprecationWarning , match = "limit parameter is deprecated"
647
+ ):
648
+ result = unmarshal_request (
649
+ request ,
650
+ spec = spec ,
651
+ cls = V30RequestParametersUnmarshaller ,
652
+ )
614
653
615
654
assert result .parameters == Parameters (
616
655
query = {
@@ -647,11 +686,14 @@ def test_get_pets_param_coordinates(self, spec):
647
686
args = query_params ,
648
687
)
649
688
650
- result = unmarshal_request (
651
- request ,
652
- spec = spec ,
653
- cls = V30RequestParametersUnmarshaller ,
654
- )
689
+ with pytest .warns (
690
+ DeprecationWarning , match = "limit parameter is deprecated"
691
+ ):
692
+ result = unmarshal_request (
693
+ request ,
694
+ spec = spec ,
695
+ cls = V30RequestParametersUnmarshaller ,
696
+ )
655
697
656
698
assert is_dataclass (result .parameters .query ["coordinates" ])
657
699
assert (
@@ -1948,16 +1990,22 @@ def test_delete_tags_with_requestbody(self, spec):
1948
1990
}
1949
1991
response = MockResponse (data , status_code = 200 , headers = headers )
1950
1992
1951
- response_result = unmarshal_response (request , response , spec = spec )
1993
+ with pytest .warns (
1994
+ DeprecationWarning , match = "x-delete-confirm header is deprecated"
1995
+ ):
1996
+ response_result = unmarshal_response (request , response , spec = spec )
1952
1997
assert response_result .errors == []
1953
1998
assert response_result .data is None
1954
1999
1955
- result = unmarshal_response (
1956
- request ,
1957
- response ,
1958
- spec = spec ,
1959
- cls = V30ResponseHeadersUnmarshaller ,
1960
- )
2000
+ with pytest .warns (
2001
+ DeprecationWarning , match = "x-delete-confirm header is deprecated"
2002
+ ):
2003
+ result = unmarshal_response (
2004
+ request ,
2005
+ response ,
2006
+ spec = spec ,
2007
+ cls = V30ResponseHeadersUnmarshaller ,
2008
+ )
1961
2009
1962
2010
assert result .headers == {
1963
2011
"x-delete-confirm" : True ,
0 commit comments