aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodl <[email protected]>2017-11-27 14:35:02 +0100
committercodl <[email protected]>2017-11-27 14:35:02 +0100
commit304145f4420180b23e0836a6d11fc0cec0e341bd (patch)
treee35d03c41a4f6b3f11c52257b62d0c4666ea9ce3 /tests/conftest.py
parentcfc9c1ce0c6440506d3a88397c65ad47bdd2d662 (diff)
downloadmastodon.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.py18
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 @@
1import pytest 1import pytest
2 2
3@pytest.fixture 3@pytest.fixture
4def mastodon(): 4def 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
13def mastodon_anonymous(): 13def 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()
21def status(mastodon): 21def 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()
Powered by cgit v1.2.3 (git 2.41.0)