Exemple #1
0
    def test_status_NoFailingJobs_ReturnOk(self):

        jobs = [
            Job('eric', JobStatus.UNKNOWN),
            Job('terry', JobStatus.OK),
            Job('graham', JobStatus.DISABLED)
        ]

        reader = StatusReader()
        result = reader.status(jobs)

        self.assertEqual(JobStatus.OK, result)
Exemple #2
0
    def test_status_OneFailingJob_ReturnFailing(self):

        jobs = [
            Job('eric', JobStatus.UNKNOWN),
            Job('john', JobStatus.FAILING),
            Job('terry', JobStatus.OK),
            Job('graham', JobStatus.DISABLED)
        ]

        reader = StatusReader()
        result = reader.status(jobs)

        self.assertEqual(JobStatus.FAILING, result)
Exemple #3
0
    def test_status_JobsListIsNone_ReturnUnknown(self):

        reader = StatusReader()
        result = reader.status(None)

        self.assertEqual(JobStatus.UNKNOWN, result)