diff options
author | codl <[email protected]> | 2017-11-27 14:35:02 +0100 |
---|---|---|
committer | codl <[email protected]> | 2017-11-27 14:35:02 +0100 |
commit | 304145f4420180b23e0836a6d11fc0cec0e341bd (patch) | |
tree | e35d03c41a4f6b3f11c52257b62d0c4666ea9ce3 /tests/conftest.py | |
parent | cfc9c1ce0c6440506d3a88397c65ad47bdd2d662 (diff) | |
download | mastodon.py-304145f4420180b23e0836a6d11fc0cec0e341bd.tar.gz |
rename mastodon and mastodon_anonymous fixtures to api, api_anonymous
it was starting to get confusing
Diffstat (limited to 'tests/conftest.py')
-rw-r--r-- | tests/conftest.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index ce013cb..a0733b5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py | |||
@@ -1,27 +1,27 @@ | |||
1 | import pytest | 1 | import pytest |
2 | 2 | ||
3 | @pytest.fixture | 3 | @pytest.fixture |
4 | def mastodon(): | 4 | def api(): |
5 | import mastodon as _mastodon | 5 | import mastodon |
6 | return _mastodon.Mastodon( | 6 | return mastodon.Mastodon( |
7 | api_base_url='http://localhost:3000', | 7 | api_base_url='http://localhost:3000', |
8 | client_id='__MASTODON_PY_TEST_ID', | 8 | client_id='__MASTODON_PY_TEST_ID', |
9 | client_secret='__MASTODON_PY_TEST_SECRET', | 9 | client_secret='__MASTODON_PY_TEST_SECRET', |
10 | access_token='__MASTODON_PY_TEST_TOKEN') | 10 | access_token='__MASTODON_PY_TEST_TOKEN') |
11 | 11 | ||
12 | @pytest.fixture | 12 | @pytest.fixture |
13 | def mastodon_anonymous(): | 13 | def api_anonymous(): |
14 | import mastodon as _mastodon | 14 | import mastodon |
15 | return _mastodon.Mastodon( | 15 | return mastodon.Mastodon( |
16 | api_base_url='http://localhost:3000', | 16 | api_base_url='http://localhost:3000', |
17 | client_id='__MASTODON_PY_TEST_ID', | 17 | client_id='__MASTODON_PY_TEST_ID', |
18 | client_secret='__MASTODON_PY_TEST_SECRET') | 18 | client_secret='__MASTODON_PY_TEST_SECRET') |
19 | 19 | ||
20 | @pytest.fixture() | 20 | @pytest.fixture() |
21 | def status(mastodon): | 21 | def status(api): |
22 | _status = mastodon.status_post('Toot!') | 22 | _status = api.status_post('Toot!') |
23 | yield _status | 23 | yield _status |
24 | mastodon.status_delete(_status['id']) | 24 | api.status_delete(_status['id']) |
25 | 25 | ||
26 | 26 | ||
27 | @pytest.fixture() | 27 | @pytest.fixture() |