

def testDownloadAndParseDaily(self):
    with common.TmpDir() as tmpPath:
        instrument = 'ORCL'
        path = os.path.join(tmpPath, 'quandl-daily-orcl-2010.csv')
        quandl.download_daily_bars('WIKI', instrument, 2010, self, auth_token)
        bf = quandlfeed.Feed()
        bf.addBarsFromCSV(instrument, path)
        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.testDownloadAndParseDaily/VarMisuse@48/83 `path`->`self`