def test_build_valid(encoded, opcode, data):
    assert SceneMessage.build(dict(opcode=opcode, params=data)) == encoded
def test_build_valid(exception, opcode, data):
    with pytest.raises(exception):
        SceneMessage.build(dict(opcode=opcode, params=data))
def test_parse_valid(encoded, opcode, data):
    assert SceneMessage.parse(encoded).params == data