pymastodon/tests/test_authorization.py

16 lines
374 B
Python
Raw Normal View History

2024-04-30 08:42:20 +02:00
from mastodon.application import MastodonApplication
import pytest
@pytest.fixture
def app():
yield MastodonApplication("pymastodon")
def test_authorize(app):
app.authorization.authorize()
token = app.authorization.fetch_token()
assert token is not None
def test_get_login_url(app):
url = app.authorization.get_login_url()
assert url is not None