Esempio n. 1
0
 def test_to_basic_schema(self):
     schema = Schema()
     schema.x = IntField(default=1)
     schema.y = IntField(default=2)
     field = ListProxy(MockConfig(), schema)
     field.append(schema())
     assert field.to_basic() == [{'x': 1, 'y': 2}]
Esempio n. 2
0
 def test_append(self):
     wrap = ListProxy(MockConfig(), ListField(IntField()), [1, 2, '3'])
     wrap.append('4')
     assert wrap == [1, 2, 3, 4]