[Enhancement] Add analyst_search to the Equity/Estimates Router (#6088)

* standardize price_target

* add analyst search

* black

* more black

* ruff

* linter, test parmas

* last missing param

* get rid of convert to upper

* ruff

* pylint
This commit is contained in:
Danglewood
2024-02-18 09:24:28 -08:00
committed by GitHub
parent 60a93c3266
commit 9f1891931c
15 changed files with 1543 additions and 394 deletions

View File

@@ -586,7 +586,7 @@ def test_equity_ownership_major_holders(params, obb):
@parametrize(
"params",
[
({"symbol": "AAPL", "limit": 10, "provider": "fmp"}),
({"symbol": "AAPL", "limit": 10, "provider": "fmp", "with_grade": True}),
(
{
"symbol": "AAPL",
@@ -595,13 +595,14 @@ def test_equity_ownership_major_holders(params, obb):
# optional provider params
"fields": None,
"date": None,
"date_from": None,
"date_to": None,
"start_date": None,
"end_date": None,
"importance": None,
"updated": None,
"action": None,
"analyst": None,
"firm": None,
"analyst_ids": None,
"firm_ids": None,
"page": 0,
}
),
({"symbol": "AAPL", "provider": "finviz"}),
@@ -615,6 +616,31 @@ def test_equity_estimates_price_target(params, obb):
assert result.results is not None
@parametrize(
"params",
[
(
{
"limit": 10,
"provider": "benzinga",
# optional provider params
"fields": None,
"analyst_ids": None,
"firm_ids": None,
"firm_name": "Barclays",
"analyst_name": None,
}
),
],
)
@pytest.mark.integration
def test_equity_estimates_analyst_search(params, obb):
result = obb.equity.estimates.analyst_search(**params)
assert result
assert isinstance(result, OBBject)
assert result.results is not None
@parametrize(
"params",
[