def test_filling_results(self, data=[]): """ Test the filling of results on data given. """ function = self.instance.filling_results(get_response_api(self.url)) self.assertIsInstance(function, list) self.assertEqual(len(get_response_api(self.url)), 4)
def test_get_salary_per_player(self, data=[]): """ Test the salary per player. """ function = self.instance.get_salary_per_player(get_response_api(self.url)) self.assertIsInstance(function, list) self.assertEqual(len(get_response_api(self.url)), 4)
def test_get_group_percentage(self, data=[]): """ Test the percentage of the team. """ function = self.instance.get_group_percentage(get_response_api(self.url)) self.assertIsInstance(function, list) self.assertEqual(len(get_response_api(self.url)), 4)
def test_get_individual_percentage(self, data=[]): """ Test the individual percentage per player. """ function = self.instance.get_individual_percentage(get_response_api(self.url)) self.assertIsInstance(function, list) self.assertEqual(len(get_response_api(self.url)), 4)
def test_get_response_api(self, url=''): """ Test the response api, passing an url. RAISE SystemExit TEST whe pass a self.fake_url, but the system rise an error on it. """ with self.assertRaises(SystemExit): api = get_response_api(self.url) self.assertIsInstance(api, list) fake_api = get_response_api(self.fake_url) self.assertIsInstance(fake_api, list)