mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 04:52:07 +00:00
missing test coverage that appeared in famafrench..
This commit is contained in:
@@ -568,6 +568,18 @@ def test_get_international_portfolio_data_index_missing_in_zip(monkeypatch):
|
||||
helpers.get_international_portfolio_data(index="all")
|
||||
|
||||
|
||||
def test_get_international_portfolio_data_unresolved_country_index(monkeypatch):
|
||||
monkeypatch.setitem(helpers.COUNTRY_PORTFOLIO_FILES, "Japan", None)
|
||||
monkeypatch.setattr(
|
||||
helpers,
|
||||
"download_international_portfolios",
|
||||
lambda url: _IntlResponse(_make_zip("Other.Dat", b"data")),
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match="Could not resolve portfolio index"):
|
||||
helpers.get_international_portfolio_data(country="japan")
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# get_international_portfolio (measure validation - monkeypatched network)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user