From adc75c469774ebbe0bece90a5abed07f6562dfaf Mon Sep 17 00:00:00 2001 From: codl Date: Mon, 27 Nov 2017 14:35:56 +0100 Subject: add a test for accessing a tl that one does not have access to --- tests/test_timeline.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test_timeline.py') diff --git a/tests/test_timeline.py b/tests/test_timeline.py index 492d0c7..eae0e80 100644 --- a/tests/test_timeline.py +++ b/tests/test_timeline.py @@ -28,3 +28,9 @@ def test_hashtag_tl(api): assert status['id'] in map(lambda st: st['id'], tl) finally: api.status_delete(status['id']) + +@pytest.mark.vcr() +def test_home_tl_anonymous_throws(api_anonymous): + from mastodon.Mastodon import MastodonAPIError + with pytest.raises(MastodonAPIError): + tl = api_anonymous.timeline_home() -- cgit v1.2.3