From 5262d58a0b97a04bbc3bd07a1c46c4a6a564a61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= <6774676+eumiro@users.noreply.github.com> Date: Wed, 30 Nov 2022 20:21:04 +0100 Subject: replace pytz with datetime.timezone and zoneinfo --- tests/test_status.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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 @@ import pytest from mastodon.Mastodon import MastodonAPIError, MastodonNotFoundError import datetime -import pytz +import zoneinfo import vcr import time import pickle @@ -154,7 +154,7 @@ def test_status_pin_unpin(status, api): @pytest.mark.vcr(match_on=['path']) def test_scheduled_status(api): - base_time = datetime.datetime(4000, 1, 1, 12, 13, 14, 0, pytz.timezone("Etc/GMT+2")) + base_time = datetime.datetime(4000, 1, 1, 12, 13, 14, 0, zoneinfo.ZoneInfo("Etc/GMT+2")) the_future = base_time + datetime.timedelta(minutes=20) scheduled_toot = api.status_post("please ensure adequate headroom", scheduled_at=the_future) assert scheduled_toot -- cgit v1.2.3