@@ -19,7 +19,6 @@ def test_field2choices_preserving_order(openapi):
19
19
("FieldClass" , "jsontype" ),
20
20
[
21
21
(fields .Integer , "integer" ),
22
- (fields .Number , "number" ),
23
22
(fields .Float , "number" ),
24
23
(fields .String , "string" ),
25
24
(fields .Str , "string" ),
@@ -46,9 +45,8 @@ def test_field2property_type(FieldClass, jsontype, spec_fixture):
46
45
assert res ["type" ] == jsontype
47
46
48
47
49
- @pytest .mark .parametrize ("FieldClass" , [fields .Field , fields .Raw ])
50
- def test_field2property_no_type_ (FieldClass , spec_fixture ):
51
- field = FieldClass ()
48
+ def test_field2property_no_type (spec_fixture ):
49
+ field = fields .Raw ()
52
50
res = spec_fixture .openapi .field2property (field )
53
51
assert "type" not in res
54
52
@@ -291,14 +289,14 @@ def test_field_with_load_only(spec_fixture):
291
289
292
290
293
291
def test_field_with_range_no_type (spec_fixture ):
294
- field = fields .Field (validate = validate .Range (min = 1 , max = 10 ))
292
+ field = fields .Raw (validate = validate .Range (min = 1 , max = 10 ))
295
293
res = spec_fixture .openapi .field2property (field )
296
294
assert res ["x-minimum" ] == 1
297
295
assert res ["x-maximum" ] == 10
298
296
assert "type" not in res
299
297
300
298
301
- @pytest .mark .parametrize ("field" , (fields .Number , fields .Integer ))
299
+ @pytest .mark .parametrize ("field" , (fields .Float , fields .Integer ))
302
300
def test_field_with_range_string_type (spec_fixture , field ):
303
301
field = field (validate = validate .Range (min = 1 , max = 10 ))
304
302
res = spec_fixture .openapi .field2property (field )
0 commit comments