add providers to economy api

This commit is contained in:
Igor Radovanovic
2023-10-17 12:41:54 +02:00
parent 57df6dc86e
commit 7b3a025bbb

View File

@@ -20,7 +20,7 @@ def headers():
@pytest.mark.parametrize(
"params",
[({"index": "dowjones"})],
[({"index": "dowjones", "provider": "fmp"})],
)
@pytest.mark.integration
def test_economy_const(params, headers):
@@ -44,6 +44,7 @@ def test_economy_const(params, headers):
"harmonized": True,
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"provider": "fred",
}
),
(
@@ -173,7 +174,14 @@ def test_economy_index(params, headers):
@pytest.mark.parametrize(
"params",
[
({"symbol": "BUKBUS", "start_date": "2023-01-01", "end_date": "2023-06-06"}),
(
{
"symbol": "BUKBUS",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"provider": "cboe",
}
),
(
{
"interval": "1m",
@@ -207,7 +215,7 @@ def test_economy_european_index(params, headers):
@pytest.mark.parametrize(
"params",
[({"symbol": "BUKBUS"})],
[({"symbol": "BUKBUS", "provider": "cboe"})],
)
@pytest.mark.integration
def test_economy_european_index_constituents(params, headers):
@@ -296,7 +304,7 @@ def test_economy_index_snapshots(params, headers):
@pytest.mark.parametrize(
"params",
[({"query": "grain"})],
[({"query": "grain", "provider": "quandl"})],
)
@pytest.mark.integration
def test_economy_cot_search(params, headers):
@@ -312,7 +320,6 @@ def test_economy_cot_search(params, headers):
@pytest.mark.parametrize(
"params",
[
({}),
(
{
"code": "13874P",
@@ -349,6 +356,7 @@ def test_economy_cot(params, headers):
"end_date": "2023-06-06",
"collapse": "monthly",
"transform": "diff",
"provider": "quandl",
}
)
],
@@ -392,7 +400,14 @@ def test_economy_fred_index(params, headers):
@pytest.mark.parametrize(
"params",
[
({"units": "usd", "start_date": "2023-01-01", "end_date": "2023-06-06"}),
(
{
"units": "usd",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"provider": "oecd",
}
),
(
{
"country": "united_states",
@@ -418,7 +433,14 @@ def test_economy_gdpnom(params, headers):
@pytest.mark.parametrize(
"params",
[
({"units": "yoy", "start_date": "2023-01-01", "end_date": "2023-06-06"}),
(
{
"units": "yoy",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"provider": "oecd",
}
),
(
{
"country": "united_states",
@@ -450,6 +472,7 @@ def test_economy_gdpreal(params, headers):
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"type": "real",
"provider": "oecd",
}
),
(