Exemple #1
0
 def test_resume_clears_lease_expires(self):
     """A job that resumes should null out the lease_expires."""
     job = Job(_status=JobStatus.SUSPENDED)
     job.lease_expires = UTC_NOW
     job.resume()
     self.assertIsNone(job.lease_expires)
Exemple #2
0
 def test_queue_clears_lease_expires(self):
     """Queueing a job releases its lease."""
     job = Job(_status=JobStatus.RUNNING)
     job.lease_expires = UTC_NOW
     job.queue()
     self.assertIsNone(job.lease_expires)