Пример #1
0
 def test_with_default(self):
     field = fields.Arbitrary(default=0.5)
     assert field.__schema__ == {'type': 'number', 'default': 0.5}
Пример #2
0
 def test_value(self, value, expected):
     self.assert_field(fields.Arbitrary(), value, expected)
Пример #3
0
 def test_defaults(self):
     field = fields.Arbitrary()
     assert not field.required
     assert field.__schema__ == {'type': 'number'}