aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 0000000..1858ab8
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,24 @@
1import pytest
2
3@pytest.fixture
4def mastodon():
5 import mastodon as _mastodon
6 return _mastodon.Mastodon(
7 api_base_url='http://localhost:3000',
8 client_id='__MASTODON_PY_TEST_ID',
9 client_secret='__MASTODON_PY_TEST_SECRET',
10 access_token='__MASTODON_PY_TEST_TOKEN')
11
12@pytest.fixture()
13def status(mastodon):
14 _status = mastodon.status_post('Toot!')
15 yield _status
16 mastodon.status_delete(_status['id'])
17
18
19@pytest.fixture()
20def vcr_config():
21 return dict(
22 match_on = ['method', 'path', 'query', 'body'],
23 decode_compressed_response = True
24 )
Powered by cgit v1.2.3 (git 2.41.0)