mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 20:42:26 +00:00
fix: test openapi.json (#6530)
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user