mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 13:01:38 +00:00
* 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>
24 lines
480 B
Python
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)
|