aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_filters.py')
-rw-r--r--tests/test_filters.py8
1 files changed, 8 insertions, 0 deletions
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):
70 70
71@pytest.mark.vcr() 71@pytest.mark.vcr()
72def test_filter_clientside(api, api2): 72def test_filter_clientside(api, api2):
73 # Make sure no filters are left over from some previous run
74 # Unclean, but neccesary
75 all_filters = api.filters()
76 for mastodon_filter in all_filters:
77 api.filter_delete(mastodon_filter)
78
73 time.sleep(2) 79 time.sleep(2)
74 api.account_follow(api2.account_verify_credentials()) 80 api.account_follow(api2.account_verify_credentials())
75 keyword_filter_1 = api.filter_create("anime", ['home'], irreversible = False, whole_word = False, expires_in = None) 81 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):
79 status_2 = api2.toot("Girugamesh!") 85 status_2 = api2.toot("Girugamesh!")
80 status_3 = api2.toot("Girugameshnetworking!") 86 status_3 = api2.toot("Girugameshnetworking!")
81 status_4 = api2.toot("I love japanimation!") 87 status_4 = api2.toot("I love japanimation!")
88 time.sleep(2)
89
82 tl = api.timeline_home() 90 tl = api.timeline_home()
83 try: 91 try:
84 assert status_1['id'] in map(lambda st: st['id'], tl) 92 assert status_1['id'] in map(lambda st: st['id'], tl)
Powered by cgit v1.2.3 (git 2.41.0)