pymastodon/tests/test_timelines.py

22 lines
567 B
Python
Raw Normal View History

2024-04-30 08:42:20 +02:00
from mastodon.application import MastodonApplication
from mastodon.timelines import Timelines
from mastodon.model.status import Status
from loguru import logger
import pytest
@pytest.fixture
def app():
yield MastodonApplication("pymastodon")
def test_home_timeline(app):
response = app.timelines.home_timeline()
assert response is not None
statuses = []
for status in response:
try:
statuses.append(Status.model_validate(status))
except Exception as ve:
logger.debug(status)
logger.error(ve)