示例#1
0
文件: test_jobs.py 项目: ceph/paddles
 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)
示例#2
0
 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)
示例#3
0
文件: test_jobs.py 项目: ceph/paddles
 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')
示例#4
0
文件: test_jobs.py 项目: ceph/paddles
 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')
示例#5
0
 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')
示例#6
0
 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')