Пример #1
0
 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'])
Пример #2
0
 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'])
Пример #3
0
 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"])
Пример #4
0
 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'])
Пример #5
0
    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'])
Пример #6
0
 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)
Пример #7
0
 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)
Пример #8
0
 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)
Пример #9
0
 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)
Пример #10
0
 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)
Пример #11
0
 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)
Пример #12
0
 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)
Пример #13
0
 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)