From 2c2f55fd63e4096580f4d56279c261cedb1be1a9 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Fri, 11 Oct 2019 22:43:20 +0200 Subject: Fix test to not use the mention fixture --- tests/test_notifications.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tests/test_notifications.py') 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): notifications = api.notifications() api.notifications_dismiss(notifications[0]) # TODO possibly verify that this returns a notif dict -def test_notifications_dismiss_pre_2_9_2(api, mention): +def test_notifications_dismiss_pre_2_9_2(api, api2): with vcr.use_cassette('test_notifications_dismiss.yaml', cassette_library_dir='tests/cassettes_pre_2_9_2', record_mode='none'): - notifications = api.notifications() - api.notifications_dismiss(notifications[0]) + status = None + try: + status = api2.status_post('@mastodonpy_test hello!') + notifications = api.notifications() + api.notifications_dismiss(notifications[0]) + finally: + if not status is None: + api2.status_delete(status) @pytest.mark.vcr() def test_notifications_clear(api): -- cgit v1.2.3