def test_upper(self): assert get_historical('AAPL', self.now) is not None
def test_lower(self): assert get_historical('aapl', self.now) is not None
def test_invalidName(self): assert get_historical('apl', self.now) is None
def test_upper(self): assert len(get_historical('AAPL', self.now)) > 0
def test_invalid(self): assert len(get_historical('abcd', self.now)) == 0
def test_lower(self): assert len(get_historical('aapl', self.now)) > 0
def gen_graph_port(request, code, date): now = datetime.now() date = datetime.timestamp(now) historical.get_historical(code, date) return HttpResponseRedirect('../../my_portfolio/display=true/')
def gen_graph(request, code, date): historical.get_historical(code, date) return HttpResponseRedirect('../../my_watchlist/display=true/')