aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_timeline.py')
-rw-r--r--tests/test_timeline.py20
1 files changed, 10 insertions, 10 deletions
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 @@
1import pytest 1import pytest
2 2
3@pytest.mark.vcr() 3@pytest.mark.vcr()
4def test_public_tl_anonymous(mastodon_anonymous, status): 4def test_public_tl_anonymous(api_anonymous, status):
5 tl = mastodon_anonymous.timeline_public() 5 tl = api_anonymous.timeline_public()
6 assert status['id'] in map(lambda st: st['id'], tl) 6 assert status['id'] in map(lambda st: st['id'], tl)
7 # although tempting, we can't do 7 # although tempting, we can't do
8 # assert status in tl 8 # assert status in tl
@@ -10,21 +10,21 @@ def test_public_tl_anonymous(mastodon_anonymous, status):
10 # pagination-related attributes 10 # pagination-related attributes
11 11
12@pytest.mark.vcr() 12@pytest.mark.vcr()
13def test_public_tl(mastodon, status): 13def test_public_tl(api, status):
14 tl = mastodon.timeline_public() 14 tl = api.timeline_public()
15 print(tl[0]) 15 print(tl[0])
16 assert status['id'] in map(lambda st: st['id'], tl) 16 assert status['id'] in map(lambda st: st['id'], tl)
17 17
18@pytest.mark.vcr() 18@pytest.mark.vcr()
19def test_home_tl(mastodon, status): 19def test_home_tl(api, status):
20 tl = mastodon.timeline_home() 20 tl = api.timeline_home()
21 assert status['id'] in map(lambda st: st['id'], tl) 21 assert status['id'] in map(lambda st: st['id'], tl)
22 22
23@pytest.mark.vcr() 23@pytest.mark.vcr()
24def test_hashtag_tl(mastodon): 24def test_hashtag_tl(api):
25 status = mastodon.status_post('#hoot (hashtag toot)') 25 status = api.status_post('#hoot (hashtag toot)')
26 tl = mastodon.timeline_hashtag('hoot') 26 tl = api.timeline_hashtag('hoot')
27 try: 27 try:
28 assert status['id'] in map(lambda st: st['id'], tl) 28 assert status['id'] in map(lambda st: st['id'], tl)
29 finally: 29 finally:
30 mastodon.status_delete(status['id']) 30 api.status_delete(status['id'])
Powered by cgit v1.2.3 (git 2.41.0)