diff options
Diffstat (limited to 'tests/test_account.py')
-rw-r--r-- | tests/test_account.py | 34 |
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 @@ | |||
1 | import pytest | 1 | import pytest |
2 | from mastodon.Mastodon import MastodonAPIError, MastodonIllegalArgumentError | 2 | from mastodon.Mastodon import MastodonAPIError, MastodonIllegalArgumentError |
3 | import re | 3 | import re |
4 | import time | ||
4 | 5 | ||
5 | @pytest.mark.vcr() | 6 | @pytest.mark.vcr() |
6 | def test_account(api): | 7 | def test_account(api): |
@@ -215,3 +216,36 @@ def test_account_pin_unpin(api, api2): | |||
215 | def test_preferences(api): | 216 | def test_preferences(api): |
216 | prefs = api.preferences() | 217 | prefs = api.preferences() |
217 | assert prefs | 218 | assert prefs |
219 | |||
220 | @pytest.mark.vcr() | ||
221 | def 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() | ||
233 | def 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 | |||