mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 20:42:26 +00:00
[Feature] Add EIA Daily Spot Prices Data via FRED (#6677)
* add EIA daily spot prices data via FRED * line too long * comment out the test skipped test * fix test? * delete commented out sections * unused argument * name things like Minh says --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
This commit is contained in:
@@ -20,32 +20,23 @@ def obb(pytestconfig): # pylint: disable=inconsistent-return-statements
|
||||
[
|
||||
(
|
||||
{
|
||||
"asset": "gold",
|
||||
"commodity": "all",
|
||||
"start_date": None,
|
||||
"end_date": None,
|
||||
"collapse": None,
|
||||
"frequency": None,
|
||||
"transform": None,
|
||||
"provider": "nasdaq",
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"asset": "silver",
|
||||
"start_date": "1990-01-01",
|
||||
"end_date": "2023-01-01",
|
||||
"collapse": "monthly",
|
||||
"transform": "diff",
|
||||
"provider": "nasdaq",
|
||||
"aggregation_method": None,
|
||||
"provider": "fred",
|
||||
}
|
||||
),
|
||||
],
|
||||
)
|
||||
@pytest.mark.integration
|
||||
def test_commodity_lbma_fixing(params, obb):
|
||||
"""Test the LBMA fixing endpoint."""
|
||||
def test_commodity_price_spot(params, obb):
|
||||
"""Test the commodity spot prices endpoint."""
|
||||
params = {p: v for p, v in params.items() if v}
|
||||
|
||||
result = obb.commodity.lbma_fixing(**params)
|
||||
result = obb.commodity.price.spot(**params)
|
||||
assert result
|
||||
assert isinstance(result, OBBject)
|
||||
assert len(result.results) > 0
|
||||
|
||||
Reference in New Issue
Block a user