Files
OpenBB/tests/gamestonk_terminal/etf/test_financedatabase_view.py
Colin Delahunty 92d6276c21 Remove Tabulate 2 (#1259)
* Removed tabulate

* Removed way more tab

* Fixed tests

* Reverted test

* Fixed pylint

* Fixed tests

* Fixed Mypy Issue

Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-01-25 19:03:46 -05:00

58 lines
1.4 KiB
Python

# IMPORTATION STANDARD
# IMPORTATION THIRDPARTY
import pytest
# IMPORTATION INTERNAL
from gamestonk_terminal.etf import financedatabase_view
from gamestonk_terminal import helper_funcs
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_headers": [("User-Agent", None)],
}
@pytest.mark.vcr()
@pytest.mark.record_stdout
@pytest.mark.parametrize(
"name",
["oil", "banks"],
)
def test_display_etf_by_name(name, mocker):
mocker.patch.object(
target=helper_funcs.gtff, attribute="USE_TABULATE_DF", new=False
)
financedatabase_view.display_etf_by_name(name, limit=5, export="")
@pytest.mark.vcr()
@pytest.mark.record_stdout
@pytest.mark.parametrize(
"description",
["oil", "banks"],
)
def test_display_etf_by_description(description, mocker):
mocker.patch.object(
target=helper_funcs.gtff, attribute="USE_TABULATE_DF", new=False
)
financedatabase_view.display_etf_by_description(description, limit=5, export="")
@pytest.mark.vcr()
@pytest.mark.record_stdout
@pytest.mark.parametrize(
"category",
[
"Bank Loan",
"Bear Market",
],
)
def test_display_etf_by_category(category, mocker):
mocker.patch.object(
target=helper_funcs.gtff, attribute="USE_TABULATE_DF", new=False
)
financedatabase_view.display_etf_by_category(category, limit=5, export="")