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)