mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-01 23:12:21 +00:00
* nox file to account for all dirs inside sdk (core+provider) * adding integration marker
39 lines
1023 B
Python
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)
|