Beispiel #1
0
 def test_active_job_counts_some(self):
     jobs_list = [
         {"id": 1, "state": "queued"},
         {"id": 1, "state": "started"},
         ]
     job_count, started_jobs_count = active_job_counts(jobs_list)
     self.assertEqual(2, job_count)
     self.assertEqual(1, started_jobs_count)
Beispiel #2
0
 def test_active_job_counts_various(self):
     jobs_list = [
         {"id": 1, "state": "queued"},
         {"id": 1, "state": "created"},
         {"id": 1, "state": "received"},
         ]
     job_count, started_jobs_count = active_job_counts(jobs_list)
     self.assertEqual(3, job_count)
     self.assertEqual(0, started_jobs_count)
Beispiel #3
0
 def test_active_job_counts_some(self):
     jobs_list = [
         {
             "id": 1,
             "state": "queued"
         },
         {
             "id": 1,
             "state": "started"
         },
     ]
     job_count, started_jobs_count = active_job_counts(jobs_list)
     self.assertEqual(2, job_count)
     self.assertEqual(1, started_jobs_count)
Beispiel #4
0
 def test_active_job_counts_various(self):
     jobs_list = [
         {
             "id": 1,
             "state": "queued"
         },
         {
             "id": 1,
             "state": "created"
         },
         {
             "id": 1,
             "state": "received"
         },
     ]
     job_count, started_jobs_count = active_job_counts(jobs_list)
     self.assertEqual(3, job_count)
     self.assertEqual(0, started_jobs_count)
Beispiel #5
0
 def test_active_job_counts_zero_builds(self):
     job_count, started_jobs_count = active_job_counts([])
     self.assertTupleEqual((0, 0), (job_count, started_jobs_count))
Beispiel #6
0
 def test_active_job_counts_zero_builds(self):
     job_count, started_jobs_count = active_job_counts([])
     self.assertTupleEqual((0, 0), (job_count, started_jobs_count))