mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-24 02:02:32 +00:00
[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:
@@ -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",
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user