def test_job_slice_valid_many(self): run_name = 'test_job_slice_valid_many' new_run = Run(run_name) new_job = Job({'job_id': '9', 'description': 'describe the test'}, new_run) job_slice = new_job.slice('description,job_id,href') assert ('description' in job_slice and 'job_id' in job_slice and 'href' in job_slice)
def test_job_slice_invalid(self): run_name = 'test_job_slice_invalid' new_run = Run(run_name) new_job = Job({}, new_run) with pytest.raises(AttributeError): new_job.slice('bullcrap')
def test_job_slice_valid(self): run_name = 'test_job_slice_valid' new_run = Run(run_name) new_job = Job({'description': 'describe the test'}, new_run) assert 'description' in new_job.slice('description')