aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fixtures.py')
-rw-r--r--tests/fixtures.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/fixtures.py b/tests/fixtures.py
new file mode 100644
index 0000000..1b32866
--- /dev/null
+++ b/tests/fixtures.py
@@ -0,0 +1,25 @@
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
13
14@pytest.fixture()
15def status(mastodon):
16 _status = mastodon.status_post('Toot!')
17 yield _status
18 mastodon.status_delete(_status['id'])
19
20@pytest.fixture()
21def vcr_config():
22 return dict(
23 match_on = ['method', 'path', 'query', 'body'],
24 decode_compressed_response = True
25 )
Powered by cgit v1.2.3 (git 2.41.0)