Ejemplo n.º 1
0
class DummyFieldListFile(FieldListFile):
    dummy = Field('dummy', dump=str, load=int, default=12, doc='dummy_field')
Ejemplo n.º 2
0
 def test_field_dump_decorator(self):
     test_field = Field('test_field')
     dump_function = str
     test_field = test_field.dump(dump_function)
     assert test_field.to_str == dump_function
Ejemplo n.º 3
0
 def test_field_load_decorator(self):
     test_field = Field('test_field')
     load_function = int
     test_field = test_field.dump(load_function)
     assert test_field.to_str == load_function
Ejemplo n.º 4
0
 def test_field_creation(self):
     field = Field('test_field')
     assert field
Ejemplo n.º 5
0
 def test_field_dump_decorator(self):
     test_field = Field('test_field')
     dump_function = str
     test_field = test_field.dump(dump_function)
     assert test_field.to_str == dump_function
Ejemplo n.º 6
0
 def test_field_load_decorator(self):
     test_field = Field('test_field')
     load_function = int
     test_field = test_field.dump(load_function)
     assert test_field.to_str == load_function
Ejemplo n.º 7
0
 def test_field_creation(self):
     field = Field("test_field")
     assert field
Ejemplo n.º 8
0
class DummyFieldListFile(FieldListFile):
    dummy = Field("dummy", dump=str, load=int, default=12, doc="dummy_field")