示例#1
0
 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'])
示例#2
0
    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'])
示例#3
0
 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)
示例#4
0
 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)
示例#5
0
 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)
示例#6
0
 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)
示例#7
0
 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)
示例#8
0
 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)
示例#9
0
 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)
示例#10
0
 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)
示例#11
0
 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)
示例#12
0
 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)