Skip to content

Commit

Permalink
WattTime#130 Fixed LMP node count in integration_test_ercot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
r24mille committed Sep 4, 2017
1 parent 19aef1a commit cb111fb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/integration/integration_test_ercot.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
class IntegrationTestERCOT(TestCase):
def setUp(self):
self.c = client_factory('ERCOT')
self.node_counts = range(612, 633) # 632 LMP nodes as of 2017-09-04. TODO Why is this a range?

def test_request_report_gen_hrly(self):
# get data as list of dicts
Expand Down Expand Up @@ -44,9 +45,7 @@ def test_request_report_dam_hrl_lmp(self):

self.assertEqual(s.min().date(), now.date())
self.assertEqual(s.max().date(), now.date())

node_counts = range(612, 630)
self.assertIn(len(df), [n * 24 for n in node_counts]) # nodes * 24 hrs/day
self.assertIn(len(df), [n * 24 for n in self.node_counts]) # nodes * 24 hrs/day

def test_request_report_rt5m_lmp(self):
now = datetime.now(pytz.utc) - timedelta(minutes=5)
Expand All @@ -56,6 +55,4 @@ def test_request_report_rt5m_lmp(self):

self.assertLess((s.min() - now).total_seconds(), 8 * 60)
self.assertLess((s.max() - now).total_seconds(), 8 * 60)

node_counts = range(612, 630)
self.assertIn(len(df), node_counts)
self.assertIn(len(df), self.node_counts)

0 comments on commit cb111fb

Please sign in to comment.