Files
OpenBB/tests/openbb_terminal/common/test_feedparser_view.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

21 lines
549 B
Python

# IMPORTATION STANDARD
# IMPORTATION THIRDPARTY
import pytest
# IMPORTATION INTERNAL
from openbb_terminal.common.feedparser_view import display_news
@pytest.mark.vcr
@pytest.mark.record_stdout
@pytest.mark.parametrize("term", ["", "Apple", "Coal", "asdf&%$"])
def test_display_news(term, mocker):
# MOCK EXPORT_DATA
mocker.patch(target="openbb_terminal.common.feedparser_view.export_data")
# MOCK VISUALIZE_OUTPUT
mocker.patch(target="openbb_terminal.helper_classes.TerminalStyle.visualize_output")
display_news(term=term)