diff options
author | Lorenz Diener <[email protected]> | 2019-04-28 21:33:15 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2019-04-28 21:33:15 +0200 |
commit | 66524ad4df9dcff3cee3a6d6bfc198e50ce310e1 (patch) | |
tree | 5bf57ae90e96b90905e7ca2966bd2fc6197561e9 /tests/test_status.py | |
parent | eb0fa327c4b3b520e243d7b888724512a905347a (diff) | |
download | mastodon.py-66524ad4df9dcff3cee3a6d6bfc198e50ce310e1.tar.gz |
Try to fix the scheduled status test, 2.7 edition
Diffstat (limited to 'tests/test_status.py')
-rw-r--r-- | tests/test_status.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_status.py b/tests/test_status.py index 4f6295f..ef27f9c 100644 --- a/tests/test_status.py +++ b/tests/test_status.py | |||
@@ -1,6 +1,7 @@ | |||
1 | import pytest | 1 | import pytest |
2 | from mastodon.Mastodon import MastodonAPIError, MastodonNotFoundError | 2 | from mastodon.Mastodon import MastodonAPIError, MastodonNotFoundError |
3 | import datetime | 3 | import datetime |
4 | import pytz | ||
4 | 5 | ||
5 | @pytest.mark.vcr() | 6 | @pytest.mark.vcr() |
6 | def test_status(status, api): | 7 | def test_status(status, api): |
@@ -130,7 +131,7 @@ def test_status_pin_unpin(status, api): | |||
130 | 131 | ||
131 | @pytest.mark.vcr(match_on=['path']) | 132 | @pytest.mark.vcr(match_on=['path']) |
132 | def test_scheduled_status(api): | 133 | def test_scheduled_status(api): |
133 | base_time = datetime.datetime(4000, 1, 1, 12, 13, 14) | 134 | base_time = datetime.datetime(4000, 1, 1, 12, 13, 14, 0, pytz.timezone("Etc/GMT+2")) |
134 | the_future = base_time + datetime.timedelta(minutes=20) | 135 | the_future = base_time + datetime.timedelta(minutes=20) |
135 | scheduled_toot = api.status_post("please ensure adequate headroom", scheduled_at=the_future) | 136 | scheduled_toot = api.status_post("please ensure adequate headroom", scheduled_at=the_future) |
136 | assert scheduled_toot | 137 | assert scheduled_toot |