aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_timeline.py')
-rw-r--r--tests/test_timeline.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_timeline.py b/tests/test_timeline.py
index 6a27be3..5108b63 100644
--- a/tests/test_timeline.py
+++ b/tests/test_timeline.py
@@ -1,5 +1,7 @@
1import pytest 1import pytest
2from mastodon.Mastodon import MastodonAPIError, MastodonIllegalArgumentError 2from mastodon.Mastodon import MastodonAPIError,\
3 MastodonIllegalArgumentError,\
4 MastodonUnauthorizedError
3 5
4@pytest.mark.vcr() 6@pytest.mark.vcr()
5def test_public_tl_anonymous(api_anonymous, status): 7def test_public_tl_anonymous(api_anonymous, status):
@@ -18,6 +20,11 @@ def test_public_tl(api, status):
18 assert status['id'] in map(lambda st: st['id'], local) 20 assert status['id'] in map(lambda st: st['id'], local)
19 21
20@pytest.mark.vcr() 22@pytest.mark.vcr()
23def test_unauthed_home_tl_throws(api_anonymous, status):
24 with pytest.raises(MastodonUnauthorizedError):
25 api_anonymous.timeline_home()
26
27@pytest.mark.vcr()
21def test_home_tl(api, status): 28def test_home_tl(api, status):
22 tl = api.timeline_home() 29 tl = api.timeline_home()
23 assert status['id'] in map(lambda st: st['id'], tl) 30 assert status['id'] in map(lambda st: st['id'], tl)
Powered by cgit v1.2.3 (git 2.41.0)