diff options
Diffstat (limited to 'tests/test_status.py')
-rw-r--r-- | tests/test_status.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_status.py b/tests/test_status.py index 764cd24..91b07fb 100644 --- a/tests/test_status.py +++ b/tests/test_status.py | |||
@@ -3,6 +3,7 @@ from mastodon.Mastodon import MastodonAPIError, MastodonNotFoundError | |||
3 | import datetime | 3 | import datetime |
4 | import pytz | 4 | import pytz |
5 | import vcr | 5 | import vcr |
6 | import time | ||
6 | 7 | ||
7 | @pytest.mark.vcr() | 8 | @pytest.mark.vcr() |
8 | def test_status(status, api): | 9 | def test_status(status, api): |
@@ -170,3 +171,11 @@ def test_scheduled_status(api): | |||
170 | api.scheduled_status_delete(scheduled_toot_2) | 171 | api.scheduled_status_delete(scheduled_toot_2) |
171 | scheduled_toot_list_2 = api.scheduled_statuses() | 172 | scheduled_toot_list_2 = api.scheduled_statuses() |
172 | assert not scheduled_toot_2.id in map(lambda x: x.id, scheduled_toot_list_2) | 173 | assert not scheduled_toot_2.id in map(lambda x: x.id, scheduled_toot_list_2) |
174 | |||
175 | the_very_immediate_future = datetime.datetime.now() + datetime.timedelta(seconds=5) | ||
176 | scheduled_toot_4 = api.status_post("please ensure adequate headroom", scheduled_at=the_very_immediate_future) | ||
177 | time.sleep(15) | ||
178 | statuses = api.timeline_home() | ||
179 | scheduled_toot_list_3 = api.scheduled_statuses() | ||
180 | assert scheduled_toot_4.id in map(lambda x: x.id, statuses) | ||
181 | assert not scheduled_toot_4.id in map(lambda x: x.id, scheduled_toot_list_3) | ||