Exemplo n.º 1
0
def test_err_on_bad_deserializer():
    frames = yield to_frames({'x': to_serialize(1234)}, serializers=['pickle'])

    result = yield from_frames(frames, deserializers=['pickle', 'foo'])
    assert result == {'x': 1234}

    with pytest.raises(TypeError) as info:
        yield from_frames(frames, deserializers=['msgpack'])
Exemplo n.º 2
0
def test_err_on_bad_deserializer():
    frames = yield to_frames({"x": to_serialize(1234)}, serializers=["pickle"])

    result = yield from_frames(frames, deserializers=["pickle", "foo"])
    assert result == {"x": 1234}

    with pytest.raises(TypeError) as info:
        yield from_frames(frames, deserializers=["msgpack"])
Exemplo n.º 3
0
def test_err_on_bad_deserializer():
    frames = yield to_frames({'x': to_serialize(1234)},
                                     serializers=['pickle'])

    result = yield from_frames(frames, deserializers=['pickle', 'foo'])
    assert result == {'x': 1234}

    with pytest.raises(TypeError) as info:
        yield from_frames(frames, deserializers=['msgpack'])