

def create_job_binary(id, type):
    binary = mock.Mock()
    type.id = id
    binary.url = 'internal-db://42'
    if edp.compare_job_type(type, edp.JOB_TYPE_PIG):
        binary.name = 'script.pig'
    elif edp.compare_job_type(type, edp.JOB_TYPE_MAPREDUCE, edp.JOB_TYPE_JAVA):
        binary.name = 'main.jar'
    else:
        binary.name = 'script.q'
    return binary

dataset/ETHPy150Open openstack/sahara/sahara/tests/unit/service/edp/edp_test_utils.py create_job_binary/VarMisuse@20/23 `binary`->`type`