def test_to_dict_obj(self): class Foo(object): def __init__(self): self.foo = 42 expected = {"foo": 42} assert fields.to_marshallable_type(Foo()) == expected
def test_to_dict_custom_marshal(self): class Foo(object): def __marshallable__(self): return {"foo": 42} expected = {"foo": 42} assert fields.to_marshallable_type(Foo()) == expected
def test_to_dict(self): expected = data = {"foo": 42} assert fields.to_marshallable_type(data) == expected