Files
OpenBB/openbb_platform/extensions/news/integration/test_news_python.py
Danglewood 43b14e1746 [V5] openbb-news: Refactor News for V5 and Add Configurable RSS Endpoint (#7507)
* refactor news for v5 and add rss endpoint

* remove poetry.lock

---------

Co-authored-by: deeleeramone <>
2026-05-29 10:45:36 +03:00

28 lines
708 B
Python

"""Python interface integration tests."""
import pytest
from openbb_core.app.model.obbject import OBBject
@pytest.fixture(scope="session")
def obb(pytestconfig):
if pytestconfig.getoption("markexpr") != "not integration":
import openbb
return openbb.obb
return None
@pytest.mark.integration
def test_rss_python_fetches_articles(obb):
out = obb.news.rss(source="bbc_world", limit=3, fetch_body=False)
assert isinstance(out, OBBject)
assert 1 <= len(out.results) <= 3
first = out.results[0]
assert first.title
assert first.date
assert first.author
assert hasattr(first, "url")
assert hasattr(first, "excerpt")
assert hasattr(first, "body")