Exemple #1
0
 def test_enqueue_periodic_jobs_bad_queue_name(self, mock_get_periodic_jobs):
     """Test JOB enqueue_periodic_jobs diff queue name works."""
     mock_get_periodic_jobs.return_value = jobs()
     queue_name = 'badqueue'
     res = enqueue_periodic_jobs(queue_name)
     msg = "%s jobs in %s have been enqueued" % (0, queue_name)
     assert res == msg, res
Exemple #2
0
 def test_enqueue_periodic_jobs_bad_queue_name(self, mock_get_periodic_jobs):
     """Test JOB enqueue_periodic_jobs diff queue name works."""
     mock_get_periodic_jobs.return_value = jobs()
     queue_name = 'badqueue'
     res = enqueue_periodic_jobs(queue_name)
     msg = "%s jobs in %s have been enqueued" % (0, queue_name)
     assert res == msg, res
Exemple #3
0
 def test_enqueue_periodic_jobs(self, get_periodic_jobs):
     """Test JOB enqueue_periodic_jobs works."""
     get_periodic_jobs.return_value = jobs()
     queue_name = 'low'
     res = enqueue_periodic_jobs(queue_name)
     expected_jobs = [job for job in jobs() if job['queue'] == queue_name]
     msg = "%s jobs in %s have been enqueued" % (len(expected_jobs), queue_name)
     assert res == msg, res
Exemple #4
0
 def test_enqueue_periodic_jobs(self, get_periodic_jobs):
     """Test JOB enqueue_periodic_jobs works."""
     get_periodic_jobs.return_value = jobs()
     queue_name = 'low'
     res = enqueue_periodic_jobs(queue_name)
     expected_jobs = [job for job in jobs() if job['queue'] == queue_name]
     msg = "%s jobs in %s have been enqueued" % (len(expected_jobs), queue_name)
     assert res == msg, res