Files
OpenBB/openbb_sdk/extensions/news/integration/test_news_python.py
Henrique Joaquim cc1ed750aa Feature/integration marker (#5478)
* nox file to account for all dirs inside sdk (core+provider)

* adding integration marker
2023-09-26 12:16:34 +01:00

39 lines
1023 B
Python

"""Test news extension."""
import pytest
from openbb import obb
from openbb_core.app.model.obbject import OBBject
@pytest.mark.parametrize(
"params",
[
({"limit": 20}),
(
{
"display": "full",
"date": "2023-01-01",
"start_date": "2023-01-01",
"end_date": "2023-06-06",
"updated_since": 900000,
"published_since": 900000,
"sort": "created",
"order": "desc",
"isin": "US0378331005",
"cusip": "037833100",
"channels": "General",
"topics": "car",
"authors": "Benzinga Insights",
"content_types": "Car",
"provider": "benzinga",
"limit": 20,
}
),
],
)
@pytest.mark.integration
def test_news_globalnews(params):
result = obb.news.globalnews(**params)
assert result
assert isinstance(result, OBBject)