mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
Hotfix/test fix (#5827)
* Add verbosity to login * Fix tests * fix dem tests baby --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
This commit is contained in:
@@ -37,7 +37,7 @@ def get_equity_data():
|
||||
return data["stocks_data"]
|
||||
|
||||
url = "http://0.0.0.0:8000/api/v1/equity/price/historical?symbol=AAPL&provider=fmp"
|
||||
result = requests.get(url, headers=get_headers(), timeout=20)
|
||||
result = requests.get(url, headers=get_headers(), timeout=10)
|
||||
data["stocks_data"] = result.json()["results"]
|
||||
|
||||
return data["stocks_data"]
|
||||
@@ -62,7 +62,7 @@ def test_chart_equity_price_historical(params, headers):
|
||||
|
||||
query_str = get_querystring(params, [])
|
||||
url = f"http://0.0.0.0:8000/api/v1/equity/price/historical?{query_str}"
|
||||
result = requests.get(url, headers=headers, timeout=10)
|
||||
result = requests.get(url, headers=headers, timeout=40)
|
||||
assert isinstance(result, requests.Response)
|
||||
assert result.status_code == 200
|
||||
|
||||
|
||||
@@ -915,6 +915,7 @@ def test_equity_price_historical(params, headers):
|
||||
query_str = get_querystring(params, [])
|
||||
url = f"http://0.0.0.0:8000/api/v1/equity/price/historical?{query_str}"
|
||||
result = requests.get(url, headers=headers, timeout=40)
|
||||
result = requests.get(url, headers=headers, timeout=40)
|
||||
assert isinstance(result, requests.Response)
|
||||
assert result.status_code == 200
|
||||
|
||||
@@ -1335,7 +1336,7 @@ def test_equity_shorts_short_interest(params, headers):
|
||||
|
||||
query_str = get_querystring(params, [])
|
||||
url = f"http://0.0.0.0:8000/api/v1/equity/shorts/short_interest?{query_str}"
|
||||
result = requests.get(url, headers=headers, timeout=40)
|
||||
result = requests.get(url, headers=headers, timeout=60)
|
||||
assert isinstance(result, requests.Response)
|
||||
assert result.status_code == 200
|
||||
|
||||
@@ -1343,18 +1344,6 @@ def test_equity_shorts_short_interest(params, headers):
|
||||
@pytest.mark.parametrize(
|
||||
"params",
|
||||
[
|
||||
(
|
||||
{
|
||||
"symbol": "CLOV",
|
||||
"date": "2023-10-26",
|
||||
"provider": "polygon", # premium endpoint
|
||||
"limit": 1000,
|
||||
"timestamp_lte": None,
|
||||
"timestamp_gte": None,
|
||||
"timestamp_gt": None,
|
||||
"timestamp_lt": None,
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"symbol": "CLOV",
|
||||
|
||||
@@ -1249,7 +1249,7 @@ def test_equity_shorts_short_volume(params, obb):
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"params",
|
||||
[({"symbol": "AAPL"})],
|
||||
[({"symbol": "AAPL", "provider": "finra"})],
|
||||
)
|
||||
@pytest.mark.integration
|
||||
def test_equity_shorts_short_interest(params, obb):
|
||||
@@ -1264,18 +1264,6 @@ def test_equity_shorts_short_interest(params, obb):
|
||||
@pytest.mark.parametrize(
|
||||
"params",
|
||||
[
|
||||
(
|
||||
{
|
||||
"symbol": "CLOV",
|
||||
"date": "2023-10-26",
|
||||
"provider": "polygon", # premium endpoint
|
||||
"limit": 1000,
|
||||
"timestamp_lte": None,
|
||||
"timestamp_gte": None,
|
||||
"timestamp_gt": None,
|
||||
"timestamp_lt": None,
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"symbol": "CLOV",
|
||||
|
||||
Reference in New Issue
Block a user