Files
OpenBB/tests/openbb_terminal/fixedincome/test_econdb_model.py
Igor Radovanovic 65e3c8573c Fixed income unit tests (#4568)
* fixed income unit tests

* api key fix

* fix mock api key

* Update poetry.lock

* Poetry

* Pytest : fix name collisions

* dependency update

* Re-record unit test

* Update unit tests

---------

Co-authored-by: Luqman <luqazino@gmail.com>
Co-authored-by: Chavithra <chavithra@gmail.com>
2023-04-03 16:42:23 +00:00

22 lines
552 B
Python

"""Test the econdb_model.py"""
import pytest
from pandas import DataFrame
from openbb_terminal.fixedincome import econdb_model
@pytest.mark.record_http
@pytest.mark.parametrize(
"frequency, start_date, end_date, kwargs",
[
("monthly", "2019-01-01", "2022-01-01", dict()),
],
)
def test_get_treasuries(frequency, start_date, end_date, kwargs):
df = econdb_model.get_treasuries(
frequency=frequency, start_date=start_date, end_date=end_date, **kwargs
)
assert isinstance(df, DataFrame)
assert not df.empty