Beispiel #1
0
 def test_has_exceptions(self):
     job = UnityJob(_id='B-3', cli=t_rest())
     assert_that(len(job.exceptions), equal_to(1))
     exception = job.exceptions[0]
     assert_that(exception, instance_of(UnityFileSystemSizeTooSmallError))
     assert_that(str(exception), contains_string('too small'))
     assert_that(job.has_exception(), equal_to(True))
Beispiel #2
0
 def test_wait_job(self):
     job_id = 'N-3078'
     job = UnityJob(_id=job_id, cli=t_rest())
     new_job = self.jh.wait_job(job, 10, 3)
     assert_that(new_job.id, equal_to(job_id))
     assert_that(new_job.state.index, equal_to(4))
     ret = job_id in self.jh.jobs
     assert_that(ret, equal_to(False))
Beispiel #3
0
 def test_job():
     return UnityJob(_id='N-345', cli=t_rest())
Beispiel #4
0
 def test_normal_without_error(self):
     job = UnityJob(_id='N-345', cli=t_rest())
     assert_that(job.messages, has_item('Success'))
     assert_that(len(job.exceptions), equal_to(0))
Beispiel #5
0
 def test_batch_without_error(self):
     job = UnityJob(_id='B-693', cli=t_rest())
     assert_that(job.messages, has_item('Success'))
     assert_that(len(job.exceptions), equal_to(0))
     assert_that(job.has_exception(), equal_to(False))
Beispiel #6
0
 def test_messages(self):
     job = UnityJob(_id='B-3', cli=t_rest())
     assert_that(len(job.messages), equal_to(1))
     assert_that(job.messages[0], contains_string('too small'))
Beispiel #7
0
 def f():
     job = UnityJob(_id=job_id, cli=t_rest())
     self.jh.wait_job(job, 10, 3)