

def testDownloadAndParseDailyNoAdjClose(self):
    with common.TmpDir() as tmpPath:
        instrument = 'ORCL'
        path = os.path.join(tmpPath, 'quandl-daily-orcl-2013.csv')
        quandl.download_daily_bars('GOOG', 'NASDAQ_ORCL', 2013, path, auth_token)
        bf = quandlfeed.Feed()
        bf.setNoAdjClose()
        bf.addBarsFromCSV(instrument, path)
        bf.loadAll()
        self.assertEquals(bf[instrument][(- 1)].getDateTime(), datetime.datetime(2013, 12, 31))
        self.assertEquals(bf[instrument][(- 1)].getOpen(), 37.94)
        self.assertEquals(bf[instrument][(- 1)].getHigh(), 38.34)
        self.assertEquals(bf[instrument][(- 1)].getLow(), 37.88)
        self.assertEquals(bf[instrument][(- 1)].getClose(), 38.26)
        self.assertEquals(bf[instrument][(- 1)].getVolume(), 11747517)
        self.assertEquals(bf[instrument][(- 1)].getAdjClose(), None)
        self.assertEquals(bf[instrument][(- 1)].getPrice(), 38.26)

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