

def testBuildFeedDaily(self):
    with common.TmpDir() as tmpPath:
        instrument = 'ORCL'
        bf = quandl.build_feed('WIKI', [instrument], 2010, 2010, tmpPath, authToken=auth_token)
        bf.loadAll()
        self.assertEquals(bf[instrument][(- 1)].getDateTime(), datetime.datetime(2010, 12, 31))
        self.assertEquals(bf[instrument][(- 1)].getOpen(), 31.22)
        self.assertEquals(bf[instrument][(- 1)].getHigh(), 31.33)
        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)].getPrice(), 31.3)
        self.assertNotEquals(bf[instrument][(- 1)].getAdjClose(), None)

dataset/ETHPy150Open gbeced/pyalgotrade/testcases/quandl_test.py ToolsTestCase.testBuildFeedDaily/original