예제 #1
0
def test_base_field_to_struct():

    field = fields.BaseField()
    assert field.to_struct(True) is True
    assert field.to_struct(False) is False
    assert field.to_struct('chuck') == 'chuck'
    assert field.to_struct(1) == 1
예제 #2
0
    class Person(models.Base):

        name = fields.BaseField()