aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_status.py')
-rw-r--r--tests/test_status.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/test_status.py b/tests/test_status.py
new file mode 100644
index 0000000..971940a
--- /dev/null
+++ b/tests/test_status.py
@@ -0,0 +1,35 @@
1import pytest
2from mastodon.Mastodon import MastodonAPIError
3
4@pytest.mark.vcr()
5def test_status(status, api):
6 status2 = api.status(status['id'])
7 assert status2 == status
8
9@pytest.mark.vcr()
10def test_status_missing(api):
11 with pytest.raises(MastodonAPIError):
12 api.status(0)
13
14@pytest.mark.skip(reason="Doesn't look like mastodon will make a card for an url that doesn't have a TLD, and relying on some external website being reachable to make a card of is messy :/")
15def test_status_card(api):
16 status = api.status_post("http://localhost:3000")
17 card = api.status_card(status['id'])
18 assert card
19
20@pytest.mark.vcr()
21def test_status_context(status, api):
22 context = api.status_context(status['id'])
23 assert context
24
25@pytest.mark.vcr()
26def test_status_reblogged_by(status, api):
27 api.status_reblog(status['id'])
28 reblogs = api.status_reblogged_by(status['id'])
29 assert reblogs
30
31@pytest.mark.vcr()
32def test_status_favourited_by(status, api):
33 api.status_favourite(status['id'])
34 favourites = api.status_favourited_by(status['id'])
35 assert favourites
Powered by cgit v1.2.3 (git 2.41.0)