From 437f68c29a18303de3c75962021bbe030b2cf85c Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Fri, 11 Oct 2019 23:59:24 +0200 Subject: Update tests for 3.0.1 and fix regressions --- tests/test_filters.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/test_filters.py') diff --git a/tests/test_filters.py b/tests/test_filters.py index 6a86258..7accbd8 100644 --- a/tests/test_filters.py +++ b/tests/test_filters.py @@ -70,6 +70,12 @@ def test_filter_serverside(api, api2): @pytest.mark.vcr() def test_filter_clientside(api, api2): + # Make sure no filters are left over from some previous run + # Unclean, but neccesary + all_filters = api.filters() + for mastodon_filter in all_filters: + api.filter_delete(mastodon_filter) + time.sleep(2) api.account_follow(api2.account_verify_credentials()) keyword_filter_1 = api.filter_create("anime", ['home'], irreversible = False, whole_word = False, expires_in = None) @@ -79,6 +85,8 @@ def test_filter_clientside(api, api2): status_2 = api2.toot("Girugamesh!") status_3 = api2.toot("Girugameshnetworking!") status_4 = api2.toot("I love japanimation!") + time.sleep(2) + tl = api.timeline_home() try: assert status_1['id'] in map(lambda st: st['id'], tl) -- cgit v1.2.3