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:
Igor Radovanovic
2023-11-30 17:00:56 +01:00
committed by GitHub
parent 2931c08dce
commit aea1c3bcaf
3 changed files with 5 additions and 28 deletions

View File

@@ -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

View File

@@ -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",

View File

@@ -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",