def test_convert_job_data_bad_type():
    with pytest.raises(HTTPException) as err:
        jobs._convert_job_data(
            b"thisiswrong",
            "application/vnd.apache.arrow.file",
            "text/html",
            lambda x: x,
        )
    assert err.value.status_code == 400
def test_convert_job_data():
    out = jobs._convert_job_data(
        b"thisiswrong",
        "application/vnd.apache.arrow.file",
        "application/vnd.apache.arrow.file",
        lambda x: x,
    )
    assert out == b"thisiswrong"
def test_convert_job_data_invalid():
    with pytest.raises(HTTPException) as err:
        jobs._convert_job_data(b"thisiswrong",
                               "application/vnd.apache.arrow.file", "text/csv",
                               lambda x: x)
    assert err.value.status_code == 500