mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-01 15:01:18 +00:00
* 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>
21 lines
621 B
Python
21 lines
621 B
Python
from datetime import datetime
|
|
|
|
import pytest
|
|
from pandas import DataFrame
|
|
|
|
from openbb_terminal.fixedincome import oecd_model
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.parametrize("data", ["short", "short_forecast", "long", "long_forecast"])
|
|
def test_get_interest_rates(recorder, data):
|
|
"""Test get_interest_rates"""
|
|
data = oecd_model.get_interest_rate_data(
|
|
data=data,
|
|
countries=["united_states", "canada"],
|
|
start_date=datetime.strptime("2022-01-01", "%Y-%m-%d"),
|
|
end_date=datetime.strptime("2022-01-31", "%Y-%m-%d"),
|
|
)
|
|
assert isinstance(data, DataFrame)
|
|
recorder.capture(data)
|