예제 #1
0
 def test_calculate_percent(self):
     percent = api_utils.calculate_group_percent(100, 900)
     self.assertTrue(percent == 10.0)
     percent = api_utils.calculate_group_percent(0, 0)
     self.assertTrue(percent == 0)
예제 #2
0
 def test_calculate_percent(self):
     percent = api_utils.calculate_group_percent(100, 900)
     self.assertTrue(percent == 10.0)
     percent = api_utils.calculate_group_percent(0, 0)
     self.assertTrue(percent == 0)