Example #1
0
 def test_delete_running_job(self):
     job = TestingJob()
     jobs.add(job)
     self.assertEqual(response.error(jobs.JobNotDone.name), jobs.delete(job.id))
Example #2
0
 def test_delete_unknown_job(self):
     self.assertEqual(response.error(jobs.NoSuchJob.name), jobs.delete("foo"))
Example #3
0
 def test_delete_job(self, status):
     job = TestingJob()
     job._status = status
     jobs.add(job)
     self.assertEqual(response.success(), jobs.delete(job.id))