mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-02 23:41:27 +00:00
* merge branch develop with main * bump desktop version * fix the merge * sync Cargo.lock to desktop 2.0.0 * fix cli conftest.py --------- Co-authored-by: deeleeramone <>
23 lines
850 B
Python
23 lines
850 B
Python
import openbb_ecb.assets # noqa: F401
|
|
from openbb_ecb import _installed, ecb_provider
|
|
|
|
|
|
def test_provider_metadata():
|
|
assert ecb_provider.name == "ECB"
|
|
assert ecb_provider.website == "https://data.ecb.europa.eu"
|
|
keys = set(ecb_provider.fetcher_dict)
|
|
assert {"EcbMfiInterestRates", "EcbEligibleAssets"} <= keys
|
|
assert len(ecb_provider.fetcher_dict) == 11
|
|
|
|
|
|
def test_key_helpers_both_branches(monkeypatch):
|
|
for flag, helper in (
|
|
("ECONOMY_INSTALLED", _installed.economy_key),
|
|
("CURRENCY_INSTALLED", _installed.currency_key),
|
|
("FIXEDINCOME_INSTALLED", _installed.fixedincome_key),
|
|
):
|
|
monkeypatch.setattr(_installed, flag, True)
|
|
assert helper("Standard", "Alias") == "Standard"
|
|
monkeypatch.setattr(_installed, flag, False)
|
|
assert helper("Standard", "Alias") == "Alias"
|