aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_account.py')
-rw-r--r--tests/test_account.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/test_account.py b/tests/test_account.py
index 55f766f..2e823d1 100644
--- a/tests/test_account.py
+++ b/tests/test_account.py
@@ -1,6 +1,7 @@
1import pytest 1import pytest
2from mastodon.Mastodon import MastodonAPIError, MastodonIllegalArgumentError 2from mastodon.Mastodon import MastodonAPIError, MastodonIllegalArgumentError
3import re 3import re
4import time
4 5
5@pytest.mark.vcr() 6@pytest.mark.vcr()
6def test_account(api): 7def test_account(api):
@@ -215,3 +216,36 @@ def test_account_pin_unpin(api, api2):
215def test_preferences(api): 216def test_preferences(api):
216 prefs = api.preferences() 217 prefs = api.preferences()
217 assert prefs 218 assert prefs
219
220@pytest.mark.vcr()
221def test_suggested_tags(api):
222 try:
223 status = api.status_post("cool free #ringtones")
224 time.sleep(2)
225
226 suggests = api.featured_tag_suggestions()
227 assert suggests
228 assert len(suggests) > 0
229 finally:
230 api.status_delete(status)
231
232@pytest.mark.vcr()
233def test_featured_tags(api):
234 featured_tag = api.featured_tag_create("mastopytesttag")
235 assert featured_tag
236
237 tag_list = api.featured_tags()
238 assert featured_tag.name in list(map(lambda x: x.name, tag_list))
239
240 api.featured_tag_delete(featured_tag)
241 tag_list = api.featured_tags()
242 assert not featured_tag.name in list(map(lambda x: x.name, tag_list))
243
244
245
246
247
248
249
250
251
Powered by cgit v1.2.3 (git 2.41.0)