def test_fetch_realtime_non_existing(self): test_date = dates.get_database_timestamp().date() quotes = options.fetch_realtime(NON_EXISTING_SYMBOL, TEST_DB_NAME) self.assertEquals(len(quotes), 0) self._check_database_quotes(NON_EXISTING_SYMBOL, 0, test_date, 0, False, None)
def update_options(): if request.args["date"] == "": options.fetch_realtime("SPX") return jsonify()
def test_fetch_realtime_existing(self): test_date = dates.get_database_timestamp().date() quotes = options.fetch_realtime("VIX", TEST_DB_NAME) self._check_quotes(quotes, "VIX", test_date, False, None) self._check_database_quotes("VIX", len(quotes), test_date, len(quotes), False, None)