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