def test_fetch_production(self): try: data = IN_AP.fetch_production("IN-AP", self.session) self.assertIsNotNone(data) self.assertEqual(data["zoneKey"], "IN-AP") self.assertEqual(data["source"], "core.ap.gov.in") self.assertIsNotNone(data["datetime"]) self.assertIsNotNone(data["production"]) self.assertIsNotNone(data["storage"]) except Exception as ex: self.fail("IN_AP.fetch_production() raised Exception: {0}".format(ex))
def test_fetch_production(self): try: data = IN_AP.fetch_production('IN-AP', self.session) self.assertIsNotNone(data) self.assertEqual(data['countryCode'], 'IN-AP') self.assertEqual(data['source'], 'core.ap.gov.in') self.assertIsNotNone(data['datetime']) self.assertIsNotNone(data['production']) self.assertIsNotNone(data['storage']) except Exception as ex: self.fail("IN_AP.fetch_production() raised Exception: {0}".format(ex.message))