def test_benchmark_kpi_is_none(self): result = var_above_average_kpi(None, self.kpis) self.assertIsNone(result)
def test_no_benchmark_kpi(self): result = var_above_average_kpi([], self.kpis) self.assertIsNone(result)
def test_not_triggered(self): kpis = self.kpis.copy() kpis["inq_tou"] = 0.75 result = var_above_average_kpi(self.benchmark_kpis, kpis) self.assertIsNone(result)
def test_no_kpi(self): result = var_above_average_kpi(self.benchmark_kpis, {}) self.assertIsNone(result)
def test_have_kpi(self): result = var_above_average_kpi(self.benchmark_kpis, self.kpis) self.assertEqual(result, "inq_tou")