def _run_test(self, ba, kwargs): expected = client_factory(ba).get_generation(**kwargs) received = tasks.get_generation(ba, **kwargs) for i in range(len(expected)): if expected[i]['timestamp'] == received[i]['timestamp']: self.assertEqual(expected[i]['gen_MW'], received[i]['gen_MW']) self.assertEqual(expected[i]['fuel_name'], received[i]['fuel_name'])
def test_pjm_latest(self): expected = client_factory('PJM').get_generation(**self.latest_kwargs) received = tasks.get_generation('PJM', **self.latest_kwargs) for i in range(len(expected)): if expected[i]['timestamp'] == received[i]['timestamp']: self.assertEqual(expected[i]['gen_MW'], received[i]['gen_MW']) self.assertEqual(expected[i]['fuel_name'], received[i]['fuel_name'])
def test_pjm_latest(self): expected = client_factory("PJM").get_generation(**self.latest_kwargs) received = tasks.get_generation("PJM", **self.latest_kwargs) for i in range(len(expected)): if expected[i]["timestamp"] == received[i]["timestamp"]: self.assertEqual(expected[i]["gen_MW"], received[i]["gen_MW"]) self.assertEqual(expected[i]["fuel_name"], received[i]["fuel_name"])
def _run_test(self, ba, kwargs): expected = client_factory(ba).get_generation(**kwargs) received = tasks.get_generation(ba, **kwargs) self.assertEqual(len(expected), len(received)) for i in range(len(received)): if expected[i]['timestamp'] == received[i]['timestamp']: self.assertEqual(expected[i]['gen_MW'], received[i]['gen_MW']) self.assertEqual(expected[i]['fuel_name'], received[i]['fuel_name'])
def test_sveri_latest(self): expected = client_factory('AZPS').get_generation(**self.latest_kwargs) received = tasks.get_generation('AZPS', **self.latest_kwargs) self.assertEqual(expected, received)
def test_isone_latest(self): expected = client_factory('ISONE').get_generation(**self.latest_kwargs) received = tasks.get_generation('ISONE', **self.latest_kwargs) self.assertEqual(expected, received)
def test_ercot_latest(self): expected = client_factory('ERCOT').get_generation(**self.latest_kwargs) received = tasks.get_generation('ERCOT', **self.latest_kwargs) self.assertEqual(expected, received)
def test_caiso_forecast(self): expected = client_factory('CAISO').get_generation(**self.forecast_kwargs) received = tasks.get_generation('CAISO', **self.forecast_kwargs) self.assertEqual(expected, received)
def test_miso_latest(self): expected = client_factory("MISO").get_generation(**self.latest_kwargs) received = tasks.get_generation("MISO", **self.latest_kwargs) self.assertEqual(expected, received)
def test_miso_latest(self): expected = client_factory('MISO').get_generation(**self.latest_kwargs) received = tasks.get_generation('MISO', **self.latest_kwargs) self.assertEqual(expected, received)