aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhalcy <halcy@ARARAGI-KUN>2022-11-18 00:19:17 +0200
committerhalcy <halcy@ARARAGI-KUN>2022-11-18 00:19:17 +0200
commitc122f1531f03b16316fd8532cffd92f65705d56b (patch)
tree20a4b6f311b4011e4c2ef160c3e70060cb9f05b6 /tests/test_status.py
parentd19b7185d8d92a0338352b2c2169a9c3bd339ee8 (diff)
downloadmastodon.py-c122f1531f03b16316fd8532cffd92f65705d56b.tar.gz
Maybe fix test TZ issues
Diffstat (limited to 'tests/test_status.py')
-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 f45634f..5c139e6 100644
--- a/tests/test_status.py
+++ b/tests/test_status.py
@@ -176,10 +176,10 @@ def test_scheduled_status(api):
176 assert not scheduled_toot_2.id in map(lambda x: x.id, scheduled_toot_list_2) 176 assert not scheduled_toot_2.id in map(lambda x: x.id, scheduled_toot_list_2)
177 177
178 if os.path.exists("tests/cassettes/test_scheduled_status_datetimeobjects.pkl"): 178 if os.path.exists("tests/cassettes/test_scheduled_status_datetimeobjects.pkl"):
179 the_very_immediate_future = pickle.load(open("tests/cassettes/test_scheduled_status_datetimeobjects.pkl", 'rb')) 179 the_very_immediate_future = datetime.datetime.fromtimestamp(pickle.load(open("tests/cassettes/test_scheduled_status_datetimeobjects.pkl", 'rb')))
180 else: 180 else:
181 the_very_immediate_future = datetime.datetime.now() + datetime.timedelta(seconds=5) 181 the_very_immediate_future = datetime.datetime.now() + datetime.timedelta(seconds=5)
182 pickle.dump(the_very_immediate_future, open("tests/cassettes/test_scheduled_status_datetimeobjects.pkl", 'wb')) 182 pickle.dump(the_very_immediate_future.timestamp(), open("tests/cassettes/test_scheduled_status_datetimeobjects.pkl", 'wb'))
183 scheduled_toot_4 = api.status_post("please ensure adequate headroom", scheduled_at=the_very_immediate_future) 183 scheduled_toot_4 = api.status_post("please ensure adequate headroom", scheduled_at=the_very_immediate_future)
184 time.sleep(15) 184 time.sleep(15)
185 statuses = api.timeline_home() 185 statuses = api.timeline_home()
Powered by cgit v1.2.3 (git 2.41.0)