@@ -245,7 +245,7 @@ def test_params(self, app, path):
245
245
assert params == expected
246
246
247
247
248
- class TestFiledsNoLocationProvided :
248
+ class TestGetFieldsNoLocationProvided :
249
249
250
250
@pytest .fixture
251
251
def function_view (self , app ):
@@ -266,26 +266,19 @@ def path(self, app, spec, function_view):
266
266
267
267
def test_params (self , app , path ):
268
268
params = path ['get' ]['parameters' ]
269
- rule = app .url_map ._rules_by_endpoint ['get_band' ][0 ]
270
- expected = (
271
- [{
272
- 'in' : 'body' ,
273
- 'name' : 'body' ,
274
- 'required' : False ,
275
- 'schema' : {
276
- 'properties' : {
277
- 'address' : {
278
- 'type' : 'string'
279
- },
280
- 'name' : {
281
- 'type' : 'string'
282
- }
283
- },
284
- 'type' : 'object'
285
- },
286
- }] + rule_to_params (rule )
287
- )
288
- assert params == expected
269
+ assert {
270
+ 'in' : 'body' ,
271
+ 'name' : 'body' ,
272
+ 'required' : False ,
273
+ 'schema' : {
274
+ 'properties' : {
275
+ 'address' : {'type' : 'string' },
276
+ 'name' : {'type' : 'string' },
277
+ },
278
+ 'type' : 'object' ,
279
+ },
280
+ } in params
281
+
289
282
290
283
class TestSchemaNoLocationProvided :
291
284
@@ -310,13 +303,5 @@ def path(self, app, spec, function_view):
310
303
311
304
def test_params (self , app , path ):
312
305
params = path ['get' ]['parameters' ]
313
- rule = app .url_map ._rules_by_endpoint ['get_band' ][0 ]
314
- expected = (
315
- [{
316
- 'in' : 'body' ,
317
- 'name' : 'body' ,
318
- 'required' : False ,
319
- 'schema' : {'$ref' : '#/definitions/Body' }
320
- }] + rule_to_params (rule )
321
- )
322
- assert params == expected
306
+ assert {'name' : 'body' , 'in' : 'body' , 'required' : False ,
307
+ 'schema' : {'$ref' : '#/definitions/Body' }} in params
0 commit comments