aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_timeline.py')
-rw-r--r--tests/test_timeline.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/test_timeline.py b/tests/test_timeline.py
index 4e77ff7..3a75029 100644
--- a/tests/test_timeline.py
+++ b/tests/test_timeline.py
@@ -1,4 +1,5 @@
1import pytest 1import pytest
2import time
2from mastodon.Mastodon import MastodonAPIError,\ 3from mastodon.Mastodon import MastodonAPIError,\
3 MastodonIllegalArgumentError,\ 4 MastodonIllegalArgumentError,\
4 MastodonUnauthorizedError 5 MastodonUnauthorizedError
@@ -38,8 +39,19 @@ def test_hashtag_tl_leading_hash(api):
38 with pytest.raises(MastodonIllegalArgumentError): 39 with pytest.raises(MastodonIllegalArgumentError):
39 api.timeline_hashtag('#hoot') 40 api.timeline_hashtag('#hoot')
40 41
41
42@pytest.mark.vcr() 42@pytest.mark.vcr()
43def test_home_tl_anonymous_throws(api_anonymous): 43def test_home_tl_anonymous_throws(api_anonymous):
44 with pytest.raises(MastodonAPIError): 44 with pytest.raises(MastodonAPIError):
45 api_anonymous.timeline_home() 45 api_anonymous.timeline_home()
46
47@pytest.mark.vcr()
48def test_conversations(api, api2):
49 account = api.account_verify_credentials()
50 status = api.status_post("@admin ilu bby ;3", visibility="direct")
51 time.sleep(2)
52 conversations = api2.conversations()
53 api.status_delete(status)
54 assert conversations
55 assert status.id in map(lambda x: x.last_status.id, conversations)
56 assert account.id in map(lambda x: x.accounts[0].id, conversations)
57
Powered by cgit v1.2.3 (git 2.41.0)