def test__start_stop_task_without_job_id(): job_without_id = Job() resp = job_without_id.start() assert resp.HasField('error') assert resp.error.HasField('notFound') resp = job_without_id.stop() assert resp.HasField('error') assert resp.error.HasField('notFound')
def test__start_stop_task_without_job_id(peloton_client): job_without_id = Job(client=peloton_client, ) resp = job_without_id.start() assert resp.HasField("error") assert resp.error.HasField("notFound") resp = job_without_id.stop() assert resp.HasField("error") assert resp.error.HasField("notFound")
def test__start_stop_task_with_nonexistent_job_id(): job_with_nonexistent_id = Job() job_with_nonexistent_id.job_id = "nonexistent-job-id" resp = job_with_nonexistent_id.start() assert resp.HasField('error') assert resp.error.HasField('notFound') resp = job_with_nonexistent_id.stop() assert resp.HasField('error') assert resp.error.HasField('notFound')
def test__start_stop_task_with_nonexistent_job_id(peloton_client): job_with_nonexistent_id = Job(client=peloton_client) job_with_nonexistent_id.job_id = "nonexistent-job-id" resp = job_with_nonexistent_id.start() assert resp.HasField("error") assert resp.error.HasField("notFound") resp = job_with_nonexistent_id.stop() assert resp.HasField("error") assert resp.error.HasField("notFound")