summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Sousa <montezdesousa@gmail.com>2024-06-21 17:19:34 +0100
committerDiogo Sousa <montezdesousa@gmail.com>2024-06-21 17:19:34 +0100
commite7ee288bc077e5f81034876d8bc9e682e3b15846 (patch)
treef9a23518977338cc5a56f62860c94f650429e42d
parent919cb023dcaffc6b28f0baf0c389fc9215fc5ec9 (diff)
fix: test openapi.jsonbugfix/test-openapi
-rw-r--r--openbb_platform/core/tests/api/test_rest_api.py8
-rw-r--r--openbb_platform/extensions/tests/utils/integration_tests_testers.py9
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