Skip to content

Commit

Permalink
Fixed testcases.
Browse files Browse the repository at this point in the history
  • Loading branch information
gbeced committed Jul 15, 2014
1 parent ac17669 commit 195d738
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions testcases/quandl_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ def testDownloadAndParseDaily(self):
self.assertEquals(bf[instrument][-1].getLow(), 30.93)
self.assertEquals(bf[instrument][-1].getClose(), 31.3)
self.assertEquals(bf[instrument][-1].getVolume(), 11716300)
self.assertEquals(bf[instrument][-1].getAdjClose(), 30.23179912467581)
self.assertEquals(bf[instrument][-1].getPrice(), 31.3)
# Not checking against a specific value since this is going to change
# as time passes by.
self.assertNotEquals(bf[instrument][-1].getAdjClose(), None)

def testDownloadAndParseDaily_UseAdjClose(self):
with common.TmpDir() as tmpPath:
Expand All @@ -66,8 +68,10 @@ def testDownloadAndParseDaily_UseAdjClose(self):
self.assertEquals(bf[instrument][-1].getLow(), 30.93)
self.assertEquals(bf[instrument][-1].getClose(), 31.3)
self.assertEquals(bf[instrument][-1].getVolume(), 11716300)
self.assertEquals(bf[instrument][-1].getAdjClose(), 30.23179912467581)
self.assertEquals(bf[instrument][-1].getPrice(), 30.23179912467581)
self.assertEquals(bf[instrument][-1].getPrice(), bf[instrument][-1].getAdjClose())
# Not checking against a specific value since this is going to change
# as time passes by.
self.assertNotEquals(bf[instrument][-1].getAdjClose(), None)

def testDownloadAndParseDailyNoAdjClose(self):
with common.TmpDir() as tmpPath:
Expand Down Expand Up @@ -122,8 +126,10 @@ def testBuildFeedDaily(self):
self.assertEquals(bf[instrument][-1].getLow(), 30.93)
self.assertEquals(bf[instrument][-1].getClose(), 31.3)
self.assertEquals(bf[instrument][-1].getVolume(), 11716300)
self.assertEquals(bf[instrument][-1].getAdjClose(), 30.23179912467581)
self.assertEquals(bf[instrument][-1].getPrice(), 31.3)
# Not checking against a specific value since this is going to change
# as time passes by.
self.assertNotEquals(bf[instrument][-1].getAdjClose(), None)

def testBuildFeedWeekly(self):
with common.TmpDir() as tmpPath:
Expand All @@ -141,4 +147,3 @@ def testBuildFeedWeekly(self):
# Not checking against a specific value since this is going to change
# as time passes by.
self.assertNotEquals(bf[instrument][-1].getAdjClose(), None)

0 comments on commit 195d738

Please sign in to comment.