def test_fetch_historical_yahoo_data_non_existing(self): raw_text = stocks._fetch_historical_yahoo_data(NON_EXISTING_SYMBOL) self.assertIsNone(raw_text)
def test_fetch_historical_yahoo_data_existing(self): raw_text = stocks._fetch_historical_yahoo_data("VIX") self.assertTrue(raw_text.startswith("Date,Open,High,Low,Close,Volume")) self.assertGreater(len(raw_text), 1000)