diff options
author | codl <[email protected]> | 2017-11-30 02:36:43 +0100 |
---|---|---|
committer | codl <[email protected]> | 2017-11-30 02:36:43 +0100 |
commit | d87ada3d73de69ba371acaeca55751e2410c3786 (patch) | |
tree | 4095784a47c6d472377201817331ac93b7773867 /tests/test_notifications.py | |
parent | 9a9604896c4d586a56b4e53c055a5f762bbaab0d (diff) | |
download | mastodon.py-d87ada3d73de69ba371acaeca55751e2410c3786.tar.gz |
add tests for notification methods
Diffstat (limited to 'tests/test_notifications.py')
-rw-r--r-- | tests/test_notifications.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_notifications.py b/tests/test_notifications.py new file mode 100644 index 0000000..87c898a --- /dev/null +++ b/tests/test_notifications.py | |||
@@ -0,0 +1,21 @@ | |||
1 | import pytest | ||
2 | |||
3 | @pytest.fixture() | ||
4 | def mention(api2): | ||
5 | status = api2.status_post('@mastodonpy_test hello!') | ||
6 | yield status | ||
7 | api2.status_delete(status) | ||
8 | |||
9 | @pytest.mark.vcr() | ||
10 | def test_notifications(api, mention): | ||
11 | notifications = api.notifications() | ||
12 | api.notifications(notifications[0]) | ||
13 | |||
14 | @pytest.mark.vcr() | ||
15 | def test_notifications_dismiss(api, mention): | ||
16 | notifications = api.notifications() | ||
17 | api.notifications_dismiss(notifications[0]) | ||
18 | |||
19 | @pytest.mark.vcr() | ||
20 | def test_notifications_clear(api): | ||
21 | api.notifications_clear() | ||