Exemplo n.º 1
0
 def test_calculate_result_sanity(self):
     """
         test that function returns zero for denominator=0
     """
     scene_tool_box = PngcnSceneKpis(self.ProjectConnector_mock,
                                     self.common_mock, 16588190,
                                     self.data_provider_mock)
     # test that function returns zero for denominator=0
     numerator, denominator = 12, 0
     result = scene_tool_box.calculate_result(numerator, denominator)
     expected_result = 0
     self.assertEqual(expected_result, result)
Exemplo n.º 2
0
 def test_calculate_result_type(self):
     """
         test that the result is float
     """
     scene_tool_box = PngcnSceneKpis(self.ProjectConnector_mock,
                                     self.common_mock, 16588190,
                                     self.data_provider_mock)
     # test that the result is float
     numerator, denominator = 12, 15
     result = type(scene_tool_box.calculate_result(numerator, denominator))
     expected_result = float
     self.assertEqual(expected_result, result)