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