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