aboutsummaryrefslogblamecommitdiff
blob: a0733b5f6e58e49f76e5f0dc7d64c00b61fe9811 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11


               


                             




                                                      
               


                             



                                                      
                 

                                      
                 
                                    
 
 





                                                           
import pytest

@pytest.fixture
def api():
    import 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 api_anonymous():
    import 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(api):
    _status = api.status_post('Toot!')
    yield _status
    api.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)