From d87ada3d73de69ba371acaeca55751e2410c3786 Mon Sep 17 00:00:00 2001 From: codl Date: Thu, 30 Nov 2017 02:36:43 +0100 Subject: add tests for notification methods --- tests/test_notifications.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/test_notifications.py (limited to 'tests/test_notifications.py') 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 @@ +import pytest + +@pytest.fixture() +def mention(api2): + status = api2.status_post('@mastodonpy_test hello!') + yield status + api2.status_delete(status) + +@pytest.mark.vcr() +def test_notifications(api, mention): + notifications = api.notifications() + api.notifications(notifications[0]) + +@pytest.mark.vcr() +def test_notifications_dismiss(api, mention): + notifications = api.notifications() + api.notifications_dismiss(notifications[0]) + +@pytest.mark.vcr() +def test_notifications_clear(api): + api.notifications_clear() -- cgit v1.2.3