Files
OpenBB/openbb_platform/providers/ecb/tests/test_provider.py
Danglewood 869cfed125 [Release] openbb-v5.0.0 (#7741)
* 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 <>
2026-09-29 10:58:44 -07:00

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"