Files
OpenBB/tests/openbb_terminal/stocks/fundamental_analysis/test_polygon_view.py
Igor Radovanovic ed584cfa20 stocks/fa unit tests (#4754)
* Unit tests batch 1

* Unit tests batch 2

* Unit tests batch

* Unit tests batch

* Unit tests batch

* Unit tests batch

* Unit tests batch

* Unit tests batch

* Unit tests batch

* Unit tests batch

* Debloat

* Debloat

* Fix linting
2023-04-12 19:42:09 +00:00

37 lines
874 B
Python

import pytest
from openbb_terminal.stocks.fundamental_analysis import polygon_view
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_headers": [("User-Agent", None)],
"filter_query_parameters": [
("apiKey", "MOCK_API_KEY"),
],
}
@pytest.mark.record_http
@pytest.mark.parametrize(
"financial, quarterly, ratios, plot",
[
("income", True, False, False),
("income", False, False, False),
("balance", False, False, False),
("cash", True, False, False),
("cash", False, False, False),
],
)
def test_display_fundamentals(financial, quarterly, ratios, plot):
polygon_view.display_fundamentals(
symbol="AAPL",
statement=financial,
limit=2,
quarterly=quarterly,
ratios=ratios,
plot=plot,
export="",
)