diff options
Diffstat (limited to 'tests/test_timeline.py')
-rw-r--r-- | tests/test_timeline.py | 14 |
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 @@ | |||
1 | import pytest | 1 | import pytest |
2 | import time | ||
2 | from mastodon.Mastodon import MastodonAPIError,\ | 3 | from 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() |
43 | def test_home_tl_anonymous_throws(api_anonymous): | 43 | def 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() | ||
48 | def 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 | |||