fix: test openapi.json (#6530)

This commit is contained in:
montezdesousa
2024-06-22 12:31:49 +01:00
committed by GitHub
parent 919cb023dc
commit 99153d40fc
2 changed files with 5 additions and 12 deletions

View File

@@ -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()

View File

@@ -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