예제 #1
0
class DummyFieldListFile(FieldListFile):
    dummy = Field('dummy', dump=str, load=int, default=12, doc='dummy_field')
예제 #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
예제 #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
예제 #4
0
 def test_field_creation(self):
     field = Field('test_field')
     assert field
예제 #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
예제 #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
예제 #7
0
 def test_field_creation(self):
     field = Field("test_field")
     assert field
예제 #8
0
class DummyFieldListFile(FieldListFile):
    dummy = Field("dummy", dump=str, load=int, default=12, doc="dummy_field")