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)
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)
def test_kpi_name_is_empty(self): result = var_kpis_healths_statuses(self.computed_kpis, self.target_computed_kpis, []) self.assertDictEqual(result, {})
def test_all_kpi_is_empty(self): result = var_kpis_healths_statuses({}, {}, self.kpis_names) self.assertDictEqual(result, {})
def test_all_kpi_is_none(self): result = var_kpis_healths_statuses(None, None, self.kpis_names) self.assertIsNone(result)
def test_target_kpi_is_none(self): result = var_kpis_healths_statuses(self.computed_kpis, None, self.kpis_names) self.assertIsNone(result)