aboutsummaryrefslogtreecommitdiff
blob: ce013cb7454074807f3d5dd2b5d53a14699f3e25 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import pytest

@pytest.fixture
def mastodon():
    import mastodon as _mastodon
    return _mastodon.Mastodon(
            api_base_url='http://localhost:3000',
            client_id='__MASTODON_PY_TEST_ID',
            client_secret='__MASTODON_PY_TEST_SECRET',
            access_token='__MASTODON_PY_TEST_TOKEN')

@pytest.fixture
def mastodon_anonymous():
    import mastodon as _mastodon
    return _mastodon.Mastodon(
            api_base_url='http://localhost:3000',
            client_id='__MASTODON_PY_TEST_ID',
            client_secret='__MASTODON_PY_TEST_SECRET')

@pytest.fixture()
def status(mastodon):
    _status = mastodon.status_post('Toot!')
    yield _status
    mastodon.status_delete(_status['id'])


@pytest.fixture()
def vcr_config():
    return dict(
            match_on = ['method', 'path', 'query', 'body'],
            decode_compressed_response = True
            )
Powered by cgit v1.2.3 (git 2.41.0)