aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMiroslav Šedivý <[email protected]>2022-11-30 20:21:04 +0100
committerMiroslav Šedivý <[email protected]>2022-11-30 20:21:04 +0100
commit5262d58a0b97a04bbc3bd07a1c46c4a6a564a61c (patch)
tree549f8c109190a88257e2c55bfc6c6e05ce532ff4 /tests
parent53cb42117bd99653f6f86280011cd25299356889 (diff)
downloadmastodon.py-5262d58a0b97a04bbc3bd07a1c46c4a6a564a61c.tar.gz
replace pytz with datetime.timezone and zoneinfo
Diffstat (limited to 'tests')
-rw-r--r--tests/test_status.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_status.py b/tests/test_status.py
index e747571..1fa7fd5 100644
--- a/tests/test_status.py
+++ b/tests/test_status.py
@@ -1,7 +1,7 @@
1import pytest 1import pytest
2from mastodon.Mastodon import MastodonAPIError, MastodonNotFoundError 2from mastodon.Mastodon import MastodonAPIError, MastodonNotFoundError
3import datetime 3import datetime
4import pytz 4import zoneinfo
5import vcr 5import vcr
6import time 6import time
7import pickle 7import pickle
@@ -154,7 +154,7 @@ def test_status_pin_unpin(status, api):
154 154
155@pytest.mark.vcr(match_on=['path']) 155@pytest.mark.vcr(match_on=['path'])
156def test_scheduled_status(api): 156def test_scheduled_status(api):
157 base_time = datetime.datetime(4000, 1, 1, 12, 13, 14, 0, pytz.timezone("Etc/GMT+2")) 157 base_time = datetime.datetime(4000, 1, 1, 12, 13, 14, 0, zoneinfo.ZoneInfo("Etc/GMT+2"))
158 the_future = base_time + datetime.timedelta(minutes=20) 158 the_future = base_time + datetime.timedelta(minutes=20)
159 scheduled_toot = api.status_post("please ensure adequate headroom", scheduled_at=the_future) 159 scheduled_toot = api.status_post("please ensure adequate headroom", scheduled_at=the_future)
160 assert scheduled_toot 160 assert scheduled_toot
Powered by cgit v1.2.3 (git 2.41.0)