예제 #1
0
 def test_target_kpi_not_full(self):
     expected = {"usv_inq": -1, "inquiries": 0, "inq_tou": 2}
     target_computed_kpis = self.target_computed_kpis.copy()
     del target_computed_kpis["usvs"]
     result = var_kpis_healths_statuses(self.computed_kpis,
                                        target_computed_kpis,
                                        self.kpis_names)
     self.assertDictEqual(result, expected)
예제 #2
0
 def test_have_kpi(self):
     expected = {"usvs": 1, "usv_inq": -1, "inquiries": 0, "inq_tou": 2}
     result = var_kpis_healths_statuses(self.computed_kpis,
                                        self.target_computed_kpis,
                                        self.kpis_names)
     self.assertDictEqual(result, expected)
예제 #3
0
 def test_kpi_name_is_empty(self):
     result = var_kpis_healths_statuses(self.computed_kpis,
                                        self.target_computed_kpis, [])
     self.assertDictEqual(result, {})
예제 #4
0
 def test_all_kpi_is_empty(self):
     result = var_kpis_healths_statuses({}, {}, self.kpis_names)
     self.assertDictEqual(result, {})
예제 #5
0
 def test_all_kpi_is_none(self):
     result = var_kpis_healths_statuses(None, None, self.kpis_names)
     self.assertIsNone(result)
예제 #6
0
 def test_target_kpi_is_none(self):
     result = var_kpis_healths_statuses(self.computed_kpis, None,
                                        self.kpis_names)
     self.assertIsNone(result)