diff options
author | Lorenz Diener <[email protected]> | 2019-10-11 22:43:20 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2019-10-11 22:43:20 +0200 |
commit | 2c2f55fd63e4096580f4d56279c261cedb1be1a9 (patch) | |
tree | 0dff4cd83a15b2ed7102be63929208b7e0028071 /tests/test_notifications.py | |
parent | cb9062e5e1209cd58b22e57049cca1425449d41a (diff) | |
download | mastodon.py-2c2f55fd63e4096580f4d56279c261cedb1be1a9.tar.gz |
Fix test to not use the mention fixture
Diffstat (limited to 'tests/test_notifications.py')
-rw-r--r-- | tests/test_notifications.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/test_notifications.py b/tests/test_notifications.py index 3032519..ab9ac31 100644 --- a/tests/test_notifications.py +++ b/tests/test_notifications.py | |||
@@ -17,10 +17,16 @@ def test_notifications_dismiss(api, mention): | |||
17 | notifications = api.notifications() | 17 | notifications = api.notifications() |
18 | api.notifications_dismiss(notifications[0]) # TODO possibly verify that this returns a notif dict | 18 | api.notifications_dismiss(notifications[0]) # TODO possibly verify that this returns a notif dict |
19 | 19 | ||
20 | def test_notifications_dismiss_pre_2_9_2(api, mention): | 20 | def test_notifications_dismiss_pre_2_9_2(api, api2): |
21 | with vcr.use_cassette('test_notifications_dismiss.yaml', cassette_library_dir='tests/cassettes_pre_2_9_2', record_mode='none'): | 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() | 22 | status = None |
23 | api.notifications_dismiss(notifications[0]) | 23 | try: |
24 | status = api2.status_post('@mastodonpy_test hello!') | ||
25 | notifications = api.notifications() | ||
26 | api.notifications_dismiss(notifications[0]) | ||
27 | finally: | ||
28 | if not status is None: | ||
29 | api2.status_delete(status) | ||
24 | 30 | ||
25 | @pytest.mark.vcr() | 31 | @pytest.mark.vcr() |
26 | def test_notifications_clear(api): | 32 | def test_notifications_clear(api): |