diff options
author | Lorenz Diener <[email protected]> | 2017-11-30 16:02:52 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-11-30 16:02:52 +0100 |
commit | 7e3a4a17a28f52b186e6453a0d1f43614f110b4b (patch) | |
tree | 48aafcc35397205d52613cc305dc6baff1cbbda1 /tests/test_timeline.py | |
parent | c6f1196ddc1899e64d60b102e1cfa1c1c1321e77 (diff) | |
parent | d87ada3d73de69ba371acaeca55751e2410c3786 (diff) | |
download | mastodon.py-7e3a4a17a28f52b186e6453a0d1f43614f110b4b.tar.gz |
Merge pull request #113 from codl/more-tests
More tests!
Diffstat (limited to 'tests/test_timeline.py')
-rw-r--r-- | tests/test_timeline.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_timeline.py b/tests/test_timeline.py index d713fca..6a27be3 100644 --- a/tests/test_timeline.py +++ b/tests/test_timeline.py | |||
@@ -1,4 +1,5 @@ | |||
1 | import pytest | 1 | import pytest |
2 | from mastodon.Mastodon import MastodonAPIError, MastodonIllegalArgumentError | ||
2 | 3 | ||
3 | @pytest.mark.vcr() | 4 | @pytest.mark.vcr() |
4 | def test_public_tl_anonymous(api_anonymous, status): | 5 | def test_public_tl_anonymous(api_anonymous, status): |
@@ -30,8 +31,12 @@ def test_hashtag_tl(api): | |||
30 | finally: | 31 | finally: |
31 | api.status_delete(status['id']) | 32 | api.status_delete(status['id']) |
32 | 33 | ||
34 | def test_hashtag_tl_leading_hash(api): | ||
35 | with pytest.raises(MastodonIllegalArgumentError): | ||
36 | api.timeline_hashtag('#hoot') | ||
37 | |||
38 | |||
33 | @pytest.mark.vcr() | 39 | @pytest.mark.vcr() |
34 | def test_home_tl_anonymous_throws(api_anonymous): | 40 | def test_home_tl_anonymous_throws(api_anonymous): |
35 | from mastodon.Mastodon import MastodonAPIError | ||
36 | with pytest.raises(MastodonAPIError): | 41 | with pytest.raises(MastodonAPIError): |
37 | tl = api_anonymous.timeline_home() | 42 | api_anonymous.timeline_home() |