def test_serialize_container(): ''' serialize should work on containers ''' container = common.Container() container.foo = "bar" same_container = ujson.loads(common.serialize(container)) assert container == same_container
def test_serialize_aliases_dumps(): ''' serialize is an alias for `dumps` to mirror deserialize ''' container = {"key": "value"} same_container = ujson.loads(common.serialize(container)) assert container == same_container