From 4a04f32c2e2016f447bd8f3f99e3875942e1a4cd Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Thu, 12 Dec 2024 20:50:30 -0800 Subject: [PATCH] add intrinio to integration tests --- .../integration/test_websockets_api.py | 60 +++++++++++++++++++ .../integration/test_websockets_python.py | 60 +++++++++++++++++++ 2 files changed, 120 insertions(+) diff --git a/openbb_platform/extensions/websockets/integration/test_websockets_api.py b/openbb_platform/extensions/websockets/integration/test_websockets_api.py index a01657cecb6..bc8849c7a99 100644 --- a/openbb_platform/extensions/websockets/integration/test_websockets_api.py +++ b/openbb_platform/extensions/websockets/integration/test_websockets_api.py @@ -81,6 +81,25 @@ def headers(): "connect_kwargs": None, } ), + ( + { + "name": "test_intrinio", + "provider": "intrinio", + "symbol": "spy,qqq,iwm,tsla,nvda", + "asset_type": "stock", + "feed": "realtime", + "auth_token": None, + "results_file": None, + "save_results": False, + "table_name": "records", + "limit": 10, + "sleep_time": 0.25, + "broadcast_host": "0.0.0.0", # noqa: S104 + "broadcast_port": 6666, + "start_broadcast": False, + "connect_kwargs": None, + } + ), ], ) @pytest.mark.integration @@ -115,6 +134,10 @@ def test_websockets_create_connection(params, headers): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -144,6 +167,10 @@ def test_websockets_get_results(params, headers): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -176,6 +203,11 @@ def test_websockets_clear_results(params, headers): "symbol": "ethusd", "auth_token": None, }, + { + "name": "test_intrinio", + "symbol": "amzn", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -214,6 +246,13 @@ def test_websockets_subscribe(params, headers): "port": 6668, "uvicorn_kwargs": None, }, + { + "name": "test_intrinio", + "auth_token": None, + "host": "0.0.0.0", # noqa: S104 + "port": 6669, + "uvicorn_kwargs": None, + }, ], ) @pytest.mark.integration @@ -246,6 +285,11 @@ def test_websockets_start_broadcasting(params, headers): "auth_token": None, "symbol": "ethusd", }, + { + "name": "test_intrinio", + "auth_token": None, + "symbol": "amzn", + }, ], ) @pytest.mark.integration @@ -275,6 +319,10 @@ def test_websockets_unsubscribe(params, headers): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -304,6 +352,10 @@ def test_websockets_stop_connection(params, headers): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -333,6 +385,10 @@ def test_websockets_restart_connection(params, headers): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -362,6 +418,10 @@ def test_websockets_stop_broadcasting(params, headers): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration diff --git a/openbb_platform/extensions/websockets/integration/test_websockets_python.py b/openbb_platform/extensions/websockets/integration/test_websockets_python.py index abd6f27740f..063857ebf57 100644 --- a/openbb_platform/extensions/websockets/integration/test_websockets_python.py +++ b/openbb_platform/extensions/websockets/integration/test_websockets_python.py @@ -77,6 +77,25 @@ def obb(pytestconfig): "connect_kwargs": None, } ), + ( + { + "name": "test_intrinio", + "provider": "intrinio", + "symbol": "spy,qqq,iwm,tsla,nvda", + "asset_type": "stock", + "feed": "realtime", + "auth_token": None, + "results_file": None, + "save_results": False, + "table_name": "records", + "limit": 10, + "sleep_time": 0.25, + "broadcast_host": "0.0.0.0", # noqa: S104 + "broadcast_port": 6666, + "start_broadcast": False, + "connect_kwargs": None, + } + ), ], ) @pytest.mark.integration @@ -108,6 +127,10 @@ def test_websockets_create_connection(params, obb): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -167,6 +190,11 @@ def test_websockets_clear_results(params, obb): "symbol": "ethusd", "auth_token": None, }, + { + "name": "test_intrinio", + "symbol": "amzn", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -204,6 +232,13 @@ def test_websockets_subscribe(params, obb): "port": None, "uvicorn_kwargs": None, }, + { + "name": "test_intrinio", + "auth_token": None, + "host": "0.0.0.0", # noqa: S104 + "port": None, + "uvicorn_kwargs": None, + }, ], ) @pytest.mark.integration @@ -235,6 +270,11 @@ def test_websockets_start_broadcasting(params, obb): "symbol": "ethusd", "auth_token": None, }, + { + "name": "test_intrinio", + "symbol": "amzn", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -263,6 +303,10 @@ def test_websockets_unsubscribe(params, obb): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -291,6 +335,10 @@ def test_websockets_get_client(params, obb): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -319,6 +367,10 @@ def test_websockets_stop_connection(params, obb): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -347,6 +399,10 @@ def test_websockets_restart_connection(params, obb): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration @@ -375,6 +431,10 @@ def test_websockets_stop_broadcasting(params, obb): "name": "test_polygon", "auth_token": None, }, + { + "name": "test_intrinio", + "auth_token": None, + }, ], ) @pytest.mark.integration