From 304145f4420180b23e0836a6d11fc0cec0e341bd Mon Sep 17 00:00:00 2001 From: codl Date: Mon, 27 Nov 2017 14:35:02 +0100 Subject: rename mastodon and mastodon_anonymous fixtures to api, api_anonymous it was starting to get confusing --- tests/test_timeline.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/test_timeline.py') diff --git a/tests/test_timeline.py b/tests/test_timeline.py index 0306391..492d0c7 100644 --- a/tests/test_timeline.py +++ b/tests/test_timeline.py @@ -1,8 +1,8 @@ import pytest @pytest.mark.vcr() -def test_public_tl_anonymous(mastodon_anonymous, status): - tl = mastodon_anonymous.timeline_public() +def test_public_tl_anonymous(api_anonymous, status): + tl = api_anonymous.timeline_public() assert status['id'] in map(lambda st: st['id'], tl) # although tempting, we can't do # assert status in tl @@ -10,21 +10,21 @@ def test_public_tl_anonymous(mastodon_anonymous, status): # pagination-related attributes @pytest.mark.vcr() -def test_public_tl(mastodon, status): - tl = mastodon.timeline_public() +def test_public_tl(api, status): + tl = api.timeline_public() print(tl[0]) assert status['id'] in map(lambda st: st['id'], tl) @pytest.mark.vcr() -def test_home_tl(mastodon, status): - tl = mastodon.timeline_home() +def test_home_tl(api, status): + tl = api.timeline_home() assert status['id'] in map(lambda st: st['id'], tl) @pytest.mark.vcr() -def test_hashtag_tl(mastodon): - status = mastodon.status_post('#hoot (hashtag toot)') - tl = mastodon.timeline_hashtag('hoot') +def test_hashtag_tl(api): + status = api.status_post('#hoot (hashtag toot)') + tl = api.timeline_hashtag('hoot') try: assert status['id'] in map(lambda st: st['id'], tl) finally: - mastodon.status_delete(status['id']) + api.status_delete(status['id']) -- cgit v1.2.3