Files
OpenBB/tests/openbb_terminal/common/test_feedparser_model.py
James Simmons 5f5f07c295 Fix bugs for news (SSL, sources) and fred (SSL) (#2585)
* potential solution number 1

* Making sure certifi is referenced for news and fred

* Fix default sources not being applied

* Add unit and integration tests

Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-09-22 19:32:27 +03:00

24 lines
480 B
Python

# IMPORTATION STANDARD
# IMPORTATION THIRDPARTY
import pytest
# IMPORTATION INTERNAL
from openbb_terminal.common.feedparser_model import get_news
@pytest.mark.vcr
@pytest.mark.parametrize(
"term, sources",
[
("", ""),
("Apple", ""),
("TSLA", "bloomberg cnn"),
("Apple", "bloomberg.com"),
("asdf$#", ""),
],
)
def test_get_news(term, sources, recorder):
df = get_news(term=term, sources=sources)
recorder.capture(df)