aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorcodl <[email protected]>2017-11-29 22:34:13 +0100
committercodl <[email protected]>2017-11-29 22:34:13 +0100
commitd76c26e4b9f3975a3f0d87db9f73db2188940767 (patch)
tree778110f836db8c87769cd87672fb41c0c45df198 /tests
parent309cc26ded4fd30f970c58d9c9f7d88b327f7c18 (diff)
downloadmastodon.py-d76c26e4b9f3975a3f0d87db9f73db2188940767.tar.gz
add test for throwing when requesting a hashtag tl with a leading hash
Diffstat (limited to 'tests')
-rw-r--r--tests/test_timeline.py9
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 @@
1import pytest 1import pytest
2from mastodon.Mastodon import MastodonAPIError, MastodonIllegalArgumentError
2 3
3@pytest.mark.vcr() 4@pytest.mark.vcr()
4def test_public_tl_anonymous(api_anonymous, status): 5def 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
34def 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()
34def test_home_tl_anonymous_throws(api_anonymous): 40def 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()
Powered by cgit v1.2.3 (git 2.41.0)