def test_data_8(self): api_caller = ApiCaller() with self.assertRaises(ValueError): api_caller.get_data('Norway', 'notData', 2009)
def test_data_9(self): api_caller = ApiCaller() with self.assertRaises(KeyError): api_caller.get_data('Canada', 'emissions', 1000)
def test_data_6(self): api_caller = ApiCaller() with self.assertRaises(TypeError): api_caller.get_data('Sweden', 'emissions', True)
def test_data_7(self): api_caller = ApiCaller() with self.assertRaises(KeyError): api_caller.get_data('NotACountry', 'emissions', 2009)
def test_data_5(self): api_caller = ApiCaller() with self.assertRaises(TypeError): api_caller.get_data('Belarus', True, 2009)
def test_data_4(self): api_caller = ApiCaller() with self.assertRaises(TypeError): api_caller.get_data(True, 'emissions', 2009)
def test_data_3(self): api_caller = ApiCaller() self.assertEqual( 0.369, api_caller.get_data('Costa Rica', 'emissions_per_capita', 1960))
def test_data_2(self): api_caller = ApiCaller() self.assertEqual(58162.287, api_caller.get_data('Norway', 'emissions', 2013))
def test_data_1(self): api_caller = ApiCaller() self.assertEqual(9378126, api_caller.get_data('Sweden', 'population', 2010))