Exemplo n.º 1
0
def test_primitive_ignores_none():
    assert Bool.to_primitive(None, True) is None
    assert Choice.to_primitive(None, True) is None
    assert DateTime.to_primitive(None, True) is None
    assert Decimal.to_primitive(None, True) is None
    assert Float.to_primitive(None, True) is None
    assert Integer.to_primitive(None, True) is None
    assert String.to_primitive(None, True) is None
    assert Tuple.to_primitive(None, True) is None
    assert Uuid.to_primitive(None, True) is None
    assert Uuid.to_primitive(None, True) is None
Exemplo n.º 2
0
def test_python_ignores_none():
    assert Bool.to_python(None) is None
    assert Choice.to_python(None) is None
    assert DateTime.to_python(None) is None
    assert Decimal.to_python(None) is None
    assert Float.to_python(None) is None
    assert Integer.to_python(None) is None
    assert String.to_python(None) is None
    assert Tuple.to_python(None) is None
    assert Uuid.to_python(None) is None
    assert Uuid.to_python(None) is None
Exemplo n.º 3
0
 class Common(Entity):
     id = Integer(unique=True)
     common = taal_kaiso.TranslatableString()