diff options
author | Lorenz Diener <[email protected]> | 2019-10-11 21:51:28 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2019-10-11 21:51:28 +0200 |
commit | 30eb63261ca5964222f5a2c5f03d6bd537fac987 (patch) | |
tree | 9bc3b796f91c6b3cdabfa1ca386cb2d4b8213469 /tests/test_notifications.py | |
parent | ec58bd4de87c727d6fd8c71cc8f0d1bb312feae1 (diff) | |
download | mastodon.py-30eb63261ca5964222f5a2c5f03d6bd537fac987.tar.gz |
Implement new notification dismiss behaviour, add test for old behaviour
Diffstat (limited to 'tests/test_notifications.py')
-rw-r--r-- | tests/test_notifications.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_notifications.py b/tests/test_notifications.py index 87c898a..3032519 100644 --- a/tests/test_notifications.py +++ b/tests/test_notifications.py | |||
@@ -1,4 +1,5 @@ | |||
1 | import pytest | 1 | import pytest |
2 | import vcr | ||
2 | 3 | ||
3 | @pytest.fixture() | 4 | @pytest.fixture() |
4 | def mention(api2): | 5 | def mention(api2): |
@@ -14,7 +15,12 @@ def test_notifications(api, mention): | |||
14 | @pytest.mark.vcr() | 15 | @pytest.mark.vcr() |
15 | def test_notifications_dismiss(api, mention): | 16 | def test_notifications_dismiss(api, mention): |
16 | notifications = api.notifications() | 17 | notifications = api.notifications() |
17 | api.notifications_dismiss(notifications[0]) | 18 | api.notifications_dismiss(notifications[0]) # TODO possibly verify that this returns a notif dict |
19 | |||
20 | def test_notifications_dismiss_pre_2_9_2(api, mention): | ||
21 | with vcr.use_cassette('test_notifications_dismiss.yaml', cassette_library_dir='tests/cassettes_pre_2_9_2', record_mode='none'): | ||
22 | notifications = api.notifications() | ||
23 | api.notifications_dismiss(notifications[0]) | ||
18 | 24 | ||
19 | @pytest.mark.vcr() | 25 | @pytest.mark.vcr() |
20 | def test_notifications_clear(api): | 26 | def test_notifications_clear(api): |