示例#1
0
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
示例#2
0
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
示例#3
0
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
示例#4
0
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