22 lines
567 B
Python
22 lines
567 B
Python
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)
|