From 3ce696feeb544ca2e312093be9642be174305664 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Thu, 16 Nov 2023 05:27:26 +0530 Subject: [PATCH] remove news from equity (#5741) --- .../equity/integration/test_equity_api.py | 75 ------------------- .../equity/integration/test_equity_python.py | 71 ------------------ .../equity/openbb_equity/equity_router.py | 11 --- 3 files changed, 157 deletions(-) diff --git a/openbb_platform/extensions/equity/integration/test_equity_api.py b/openbb_platform/extensions/equity/integration/test_equity_api.py index 155c38b1a5b..db3f9f935ae 100644 --- a/openbb_platform/extensions/equity/integration/test_equity_api.py +++ b/openbb_platform/extensions/equity/integration/test_equity_api.py @@ -887,81 +887,6 @@ def test_equity_price_historical(params, headers): assert result.status_code == 200 -@pytest.mark.parametrize( - "params", - [ - ({"symbols": "AAPL", "limit": 20, "provider": "benzinga"}), - ( - { - "display": "full", - "date": "2023-01-01", - "start_date": "2023-01-01", - "end_date": "2023-06-06", - "updated_since": 1, - "published_since": 1, - "sort": "created", - "order": "desc", - "isin": "US0378331005", - "cusip": "037833100", - "channels": "General", - "topics": "AAPL", - "authors": "Benzinga Insights", - "content_types": "headline", - "provider": "benzinga", - "symbols": "AAPL,MSFT", - "limit": 20, - } - ), - ( - { - "published_utc": "2023-01-01", - "order": "desc", - "provider": "polygon", - "symbols": "AAPL", - "limit": 20, - } - ), - ( - { - "provider": "fmp", - "symbols": "AAPL", - "limit": 20, - "page": 1, - } - ), - ( - { - "provider": "yfinance", - "symbols": "AAPL", - "limit": 20, - } - ), - ( - { - "provider": "intrinio", - "symbols": "AAPL", - "limit": 20, - } - ), - ( - { - "provider": "ultima", - "symbols": "AAPL,MSFT", - } - ), - ], -) -@pytest.mark.integration -def test_equity_news(params, headers): - params = {p: v for p, v in params.items() if v} - - query_str = get_querystring(params, []) - url = f"http://0.0.0.0:8000/api/v1/equity/news?{query_str}" - result = requests.get(url, headers=headers, timeout=10) - assert isinstance(result, requests.Response) - assert result.status_code == 200 - - @pytest.mark.parametrize( "params", [({"symbol": "AAPL", "limit": 100, "provider": "fmp"})], diff --git a/openbb_platform/extensions/equity/integration/test_equity_python.py b/openbb_platform/extensions/equity/integration/test_equity_python.py index aa254ba8c4c..7c7d046455b 100644 --- a/openbb_platform/extensions/equity/integration/test_equity_python.py +++ b/openbb_platform/extensions/equity/integration/test_equity_python.py @@ -820,77 +820,6 @@ def test_equity_price_historical(params, obb): assert len(result.results) > 0 -@pytest.mark.parametrize( - "params", - [ - ({"symbols": "AAPL,MSFT", "limit": 20}), - ( - { - "display": "full", - "date": "2023-01-01", - "start_date": "2023-01-01", - "end_date": "2023-06-06", - "updated_since": 1, - "published_since": 1, - "sort": "created", - "order": "desc", - "isin": "US0378331005", - "cusip": "037833100", - "channels": "General", - "topics": "AAPL", - "authors": "Benzinga Insights", - "content_types": "headline", - "provider": "benzinga", - "symbols": "AAPL,MSFT", - "limit": 20, - } - ), - ( - { - "published_utc": "2023-01-01", - "order": "desc", - "provider": "polygon", - "symbols": "AAPL", - "limit": 20, - } - ), - ( - { - "provider": "fmp", - "symbols": "AAPL", - "limit": 20, - "page": 1, - } - ), - ( - { - "provider": "yfinance", - "symbols": "AAPL", - "limit": 20, - } - ), - ( - { - "provider": "intrinio", - "symbols": "AAPL", - "limit": 20, - } - ), - ( - { - "provider": "ultima", - "symbols": "AAPL,MSFT", - } - ), - ], -) -@pytest.mark.integration -def test_equity_news(params, obb): - result = obb.equity.news(**params) - assert result - assert isinstance(result, OBBject) - - @pytest.mark.parametrize( "params", [ diff --git a/openbb_platform/extensions/equity/openbb_equity/equity_router.py b/openbb_platform/extensions/equity/openbb_equity/equity_router.py index beece792fac..dc24939a00a 100644 --- a/openbb_platform/extensions/equity/openbb_equity/equity_router.py +++ b/openbb_platform/extensions/equity/openbb_equity/equity_router.py @@ -37,17 +37,6 @@ router.include_router(shorts_router) # pylint: disable=import-outside-toplevel, W0613:unused-argument -@router.command(model="CompanyNews") -def news( - cc: CommandContext, - provider_choices: ProviderChoices, - standard_params: StandardParams, - extra_params: ExtraParams, -) -> OBBject[BaseModel]: - """Company News. Get news for one or more companies.""" - return OBBject(results=Query(**locals()).execute()) - - @router.command(model="EquitySearch") def search( cc: CommandContext,