Example #1
0
 def test_upper(self):
     assert get_historical('AAPL', self.now) is not None
Example #2
0
 def test_lower(self):
     assert get_historical('aapl', self.now) is not None
Example #3
0
 def test_invalidName(self):
     assert get_historical('apl', self.now) is None
Example #4
0
 def test_upper(self):
     assert len(get_historical('AAPL', self.now)) > 0
Example #5
0
 def test_invalid(self):
     assert len(get_historical('abcd', self.now)) == 0
Example #6
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/')