pymastodon/tests/test_config.py

16 lines
445 B
Python

from mastodon.application import MastodonApplication
from mastodon.config import MastodonConfiguration
import pytest
import shutil
import os
@pytest.fixture
def app():
yield MastodonApplication("pymastodon")
def test_read_config(app):
assert os.path.exists(app.config.config_file)
assert app.config.get_value("server") != ""
assert app.config.get_value("client_secret") != ""
assert app.config.get_value("client_id") != ""