Esempio n. 1
0
 def test_have_kpi(self):
     result = var_kpi_mitigation(
         self.kpis_healths,
         self.computed_kpis,
         self.target_computed_kpis,
         HEALTH_STATUS["OFF_TRACK"],
     )
     self.assertTupleEqual(result, ("inquiries", "inq_tou", "tours"))
Esempio n. 2
0
 def test_kpis_healths_is_empty(self):
     result = var_kpi_mitigation(
         {},
         self.computed_kpis,
         self.target_computed_kpis,
         HEALTH_STATUS["OFF_TRACK"],
     )
     self.assertIsNone(result)
Esempio n. 3
0
 def test_kpi_is_none(self):
     result = var_kpi_mitigation(
         self.kpis_healths,
         None,
         self.target_computed_kpis,
         HEALTH_STATUS["OFF_TRACK"],
     )
     self.assertIsNone(result)
Esempio n. 4
0
 def test_have_many_mitigation_kpi(self):
     computed_kpis = self.computed_kpis.copy()
     computed_kpis["tou_app"] = 0
     computed_kpis["lease_applications"] = 5
     computed_kpis["tours"] = 14
     target_computed_kpis = self.target_computed_kpis.copy()
     target_computed_kpis["tou_app"] = 13
     target_computed_kpis["lease_applications"] = 5
     target_computed_kpis["tours"] = 13
     kpis_healths = self.kpis_healths.copy()
     kpis_healths["tou_app"] = 0
     kpis_healths["lease_applications"] = 2
     result = var_kpi_mitigation(kpis_healths, computed_kpis,
                                 target_computed_kpis, 0)
     self.assertTupleEqual(result, ("inquiries", "inq_tou", "tours"))
Esempio n. 5
0
 def test_all_kpi_is_empty(self):
     result = var_kpi_mitigation(self.kpis_healths, {}, {},
                                 HEALTH_STATUS["OFF_TRACK"])
     self.assertIsNone(result)