From e7ee288bc077e5f81034876d8bc9e682e3b15846 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Fri, 21 Jun 2024 17:19:34 +0100 Subject: fix: test openapi.json --- openbb_platform/core/tests/api/test_rest_api.py | 8 +------- .../extensions/tests/utils/integration_tests_testers.py | 9 ++++----- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/openbb_platform/core/tests/api/test_rest_api.py b/openbb_platform/core/tests/api/test_rest_api.py index af5b80ab6ab..51b06d60a76 100644 --- a/openbb_platform/core/tests/api/test_rest_api.py +++ b/openbb_platform/core/tests/api/test_rest_api.py @@ -1,14 +1,8 @@ """Test rest_api.py.""" -import pytest +from openbb_core.api.rest_api import app -@pytest.mark.skip( - "This test forces a side effect that makes test_integration_tests_ to fail in the GitHub actions.", -) def test_openapi(): """Test openapi schema generation.""" - # pylint: disable=import-outside-toplevel - from openbb_core.api.rest_api import app - assert app.openapi() diff --git a/openbb_platform/extensions/tests/utils/integration_tests_testers.py b/openbb_platform/extensions/tests/utils/integration_tests_testers.py index 20e2e5f9116..13854844b85 100644 --- a/openbb_platform/extensions/tests/utils/integration_tests_testers.py +++ b/openbb_platform/extensions/tests/utils/integration_tests_testers.py @@ -203,7 +203,10 @@ def check_missing_params( used_params = test_params[0].keys() except KeyError: used_params = test_params.keys() - if expected_param not in used_params and expected_param != "return": + if expected_param not in used_params and expected_param not in ( + "return", + "chart", + ): missing_params.append( f"Missing param {expected_param} in function {function}" ) @@ -270,10 +273,6 @@ def check_integration_tests( processing_command_params, function_params, function, True # type: ignore ) - # if "chart" is in missing_items, remove it - if "chart" in missing_items: - missing_items.remove("chart") - all_missing_items.extend(missing_items) return all_missing_items -- cgit v1.2.3