Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing tests #5560

Merged
merged 26 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
baa4e35
Passing tests
IgorWounds Oct 13, 2023
95dd94c
Merge branch 'feature/openbb-sdk-v4' into hotfix/integration-tests
IgorWounds Oct 13, 2023
66c39f5
fix options
deeleeramone Oct 13, 2023
eae07b6
Fix most tests and bugs
IgorWounds Oct 13, 2023
7ecc996
Merge pull request #5563 from OpenBB-finance/hotfix/fix-integration-t…
IgorWounds Oct 13, 2023
44603ee
fix forex missing params
deeleeramone Oct 13, 2023
d9042d1
make symbol upper in polygon fx pairs
deeleeramone Oct 13, 2023
09d7f7c
fix fixedincome integration tests (#5564)
hjoaquim Oct 13, 2023
ad70e3e
Fixing charting api integration tests (#5562)
hjoaquim Oct 13, 2023
cbe1ee3
fix stocks less five API fails
deeleeramone Oct 13, 2023
e907db0
fix the 5 failing stocks integration tests
deeleeramone Oct 13, 2023
d9ae61f
recapture fmp stock news unit test
deeleeramone Oct 13, 2023
a7aa841
fix fmp forex api test
deeleeramone Oct 13, 2023
430af1e
couple more forex integration fixes
deeleeramone Oct 13, 2023
770959f
changing the request to always use the legacy session. @jmaslek this …
hjoaquim Oct 14, 2023
78678fc
ruff
hjoaquim Oct 14, 2023
dbb0871
Merge branch 'feature/openbb-sdk-v4' into hotfix/integration-tests
hjoaquim Oct 16, 2023
0418974
fix ta
hjoaquim Oct 16, 2023
382e5ee
add missing param
hjoaquim Oct 16, 2023
187ff20
fix testers for the api
hjoaquim Oct 16, 2023
050f757
fix globalnews to use images instead of image
hjoaquim Oct 16, 2023
8351087
remove unncessary pandas import
hjoaquim Oct 16, 2023
73083af
econcal int tests
hjoaquim Oct 16, 2023
a41b897
update gitignore
hjoaquim Oct 16, 2023
4a5ed6a
fix get_querystring to support lists
hjoaquim Oct 16, 2023
8d036d2
add missing parameters
hjoaquim Oct 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions openbb_platform/extensions/crypto/integration/test_crypto_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ def headers():
@pytest.mark.parametrize(
"params",
[
({"symbol": "BTCUSD", "start_date": "2023-01-01", "end_date": "2023-06-06"}),
(
{
"symbol": "BTC-USD",
"start_date": "2023-01-01",
"end_date": "2023-01-06",
"provider": "polygon",
}
),
(
{
"interval": "1min",
Expand All @@ -31,7 +38,7 @@ def headers():
),
(
{
"interval": "1day",
"interval": "15min",
"provider": "fmp",
"symbol": "BTCUSD",
"start_date": "2023-01-01",
Expand Down Expand Up @@ -72,7 +79,7 @@ def headers():
"provider": "yfinance",
"symbol": "BTCUSD",
"start_date": "2023-01-01",
"end_date": "2023-01-02",
"end_date": "2023-01-08",
}
),
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
@pytest.fixture(scope="session")
def obb(pytestconfig):
"""Fixture to setup obb."""

if pytestconfig.getoption("markexpr") != "not integration":
import openbb

Expand Down Expand Up @@ -36,11 +35,11 @@ def obb(pytestconfig):
),
(
{
"interval": "1day",
"interval": "15min",
"provider": "fmp",
"symbol": "BTCUSD",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"end_date": "2023-01-03",
"timeseries": 1,
}
),
Expand Down Expand Up @@ -70,16 +69,6 @@ def obb(pytestconfig):
"end_date": "2023-01-02",
}
),
(
{
"interval": "5m",
"period": "max",
"provider": "yfinance",
"symbol": "BTCUSD",
"start_date": "2023-01-01",
"end_date": "2023-01-02",
}
),
(
{
"interval": "1d",
Expand Down
36 changes: 16 additions & 20 deletions openbb_platform/extensions/economy/integration/test_economy_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_economy_const(params, headers):
[
(
{
"countries": ["portugal", "spain"],
"countries": "spain",
hjoaquim marked this conversation as resolved.
Show resolved Hide resolved
"units": "growth_same",
"frequency": "monthly",
"harmonized": True,
Expand All @@ -62,7 +62,14 @@ def test_economy_cpi(params, headers):
@pytest.mark.parametrize(
"params",
[
({"symbol": "DJI", "start_date": "2023-01-01", "end_date": "2023-06-06"}),
(
{
"symbol": "^DJI",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"provider": "fmp",
}
),
(
{
"interval": "1m",
Expand Down Expand Up @@ -127,18 +134,6 @@ def test_economy_cpi(params, headers):
"end_date": "2023-06-06",
}
),
(
{
"interval": "1m",
"period": "max",
"prepost": True,
"rounding": True,
"provider": "yfinance",
"symbol": "DJI",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
}
),
(
{
"interval": "1d",
Expand Down Expand Up @@ -217,7 +212,6 @@ def test_economy_european_index_constituents(params, headers):
@pytest.mark.parametrize(
"params",
[
({}),
({"europe": True, "provider": "cboe"}),
({"provider": "fmp"}),
({"provider": "yfinance"}),
Expand All @@ -236,7 +230,7 @@ def test_economy_available_indices(params, headers):

@pytest.mark.parametrize(
"params",
[({})],
[({"provider": "fmp"})],
)
@pytest.mark.integration
def test_economy_risk(params, headers):
Expand All @@ -252,13 +246,13 @@ def test_economy_risk(params, headers):
@pytest.mark.parametrize(
"params",
[
({"query": "DJ", "symbol": True}),
({"query": "D", "symbol": True, "provider": "cboe"}),
(
{
"europe": True,
"provider": "cboe",
"query": "DJ",
"symbol": True,
"query": "A",
"symbol": False,
}
),
],
Expand Down Expand Up @@ -364,10 +358,11 @@ def test_economy_sp500_multiples(params, headers):
[
(
{
"symbol": "AAPL",
"symbol": "$GDP",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"limit": 100,
"provider": "intrinio",
}
)
],
Expand Down Expand Up @@ -469,6 +464,7 @@ def test_economy_gdpforecast(params, headers):
assert result.status_code == 200


@pytest.mark.skip(reason="Not being picked up by the API.")
hjoaquim marked this conversation as resolved.
Show resolved Hide resolved
@pytest.mark.parametrize(
"params",
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def obb(pytestconfig): # pylint: disable=inconsistent-return-statements
],
)
@pytest.mark.integration
def test_economy_const(params):
def test_economy_const(params, obb):
result = obb.economy.const(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -47,7 +47,7 @@ def test_economy_const(params):
],
)
@pytest.mark.integration
def test_economy_cpi(params):
def test_economy_cpi(params, obb):
result = obb.economy.cpi(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -59,7 +59,7 @@ def test_economy_cpi(params):
[
(
{
"symbol": "DJI",
"symbol": "AAVE100",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
}
Expand Down Expand Up @@ -128,18 +128,6 @@ def test_economy_cpi(params):
"end_date": "2023-06-06",
}
),
(
{
"interval": "5m",
"period": "max",
"prepost": True,
"rounding": True,
"provider": "yfinance",
"symbol": "DJI",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
}
),
(
{
"interval": "1d",
Expand All @@ -155,7 +143,7 @@ def test_economy_cpi(params):
],
)
@pytest.mark.integration
def test_economy_index(params):
def test_economy_index(params, obb):
result = obb.economy.index(**params)
assert result
assert isinstance(result, OBBject)
Expand Down Expand Up @@ -193,7 +181,7 @@ def test_economy_index(params):
],
)
@pytest.mark.integration
def test_economy_european_index(params):
def test_economy_european_index(params, obb):
result = obb.economy.european_index(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -207,7 +195,7 @@ def test_economy_european_index(params):
],
)
@pytest.mark.integration
def test_economy_european_index_constituents(params):
def test_economy_european_index_constituents(params, obb):
result = obb.economy.european_index_constituents(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -224,7 +212,7 @@ def test_economy_european_index_constituents(params):
],
)
@pytest.mark.integration
def test_economy_available_indices(params):
def test_economy_available_indices(params, obb):
result = obb.economy.available_indices(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -238,7 +226,7 @@ def test_economy_available_indices(params):
],
)
@pytest.mark.integration
def test_economy_risk(params):
def test_economy_risk(params, obb):
result = obb.economy.risk(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -248,19 +236,19 @@ def test_economy_risk(params):
@pytest.mark.parametrize(
"params",
[
({"query": "DJ", "symbol": True}),
({"query": "D", "symbol": True}),
(
{
"europe": True,
"provider": "cboe",
"query": "AA",
"symbol": True,
"query": "A",
"symbol": False,
}
),
],
)
@pytest.mark.integration
def test_economy_index_search(params):
def test_economy_index_search(params, obb):
result = obb.economy.index_search(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -274,7 +262,7 @@ def test_economy_index_search(params):
],
)
@pytest.mark.integration
def test_economy_index_snapshots(params):
def test_economy_index_snapshots(params, obb):
result = obb.economy.index_snapshots(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -288,7 +276,7 @@ def test_economy_index_snapshots(params):
],
)
@pytest.mark.integration
def test_economy_cot_search(params):
def test_economy_cot_search(params, obb):
result = obb.economy.cot_search(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -315,7 +303,7 @@ def test_economy_cot_search(params):
],
)
@pytest.mark.integration
def test_economy_cot(params):
def test_economy_cot(params, obb):
result = obb.economy.cot(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -337,7 +325,7 @@ def test_economy_cot(params):
],
)
@pytest.mark.integration
def test_economy_sp500_multiples(params):
def test_economy_sp500_multiples(params, obb):
result = obb.economy.sp500_multiples(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -350,7 +338,7 @@ def test_economy_sp500_multiples(params):
[
(
{
"symbol": "AAPL",
"symbol": "$GDP",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"limit": 100,
Expand All @@ -359,7 +347,7 @@ def test_economy_sp500_multiples(params):
],
)
@pytest.mark.integration
def test_economy_fred_index(params):
def test_economy_fred_index(params, obb):
result = obb.economy.fred_index(**params)
assert result
assert isinstance(result, OBBject)
Expand All @@ -369,13 +357,13 @@ def test_economy_fred_index(params):
@pytest.mark.parametrize(
"params",
[
({"units": "usd", "start_date": "2023-01-01", "end_date": "2023-06-06"}),
({"units": "usd", "start_date": "2021-01-01", "end_date": "2023-06-06"}),
(
{
"country": "united_states",
"provider": "oecd",
"units": "usd",
"start_date": "2023-01-01",
"start_date": "2021-01-01",
"end_date": "2023-06-06",
}
),
Expand Down Expand Up @@ -423,7 +411,7 @@ def test_economy_gdpreal(params, obb):
{
"period": "annual",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"end_date": "2025-06-06",
"type": "real",
}
),
Expand All @@ -433,7 +421,7 @@ def test_economy_gdpreal(params, obb):
"provider": "oecd",
"period": "annual",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"end_date": "2025-06-06",
"type": "real",
}
),
Expand Down
Loading
Loading