aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhalcy <halcy@ARARAGI-KUN>2022-11-18 00:06:24 +0200
committerhalcy <halcy@ARARAGI-KUN>2022-11-18 00:06:24 +0200
commitd19b7185d8d92a0338352b2c2169a9c3bd339ee8 (patch)
tree73ffe8e26364cbfab7bddba9b8874a2090511bfb /tests/test_timeline.py
parentc35104748dac99ee4777cfa057c1afa65ed2a117 (diff)
downloadmastodon.py-d19b7185d8d92a0338352b2c2169a9c3bd339ee8.tar.gz
try to fix tests, again
Diffstat (limited to 'tests/test_timeline.py')
-rw-r--r--tests/test_timeline.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_timeline.py b/tests/test_timeline.py
index 85026f6..14b7703 100644
--- a/tests/test_timeline.py
+++ b/tests/test_timeline.py
@@ -85,10 +85,13 @@ def test_min_max_id_datetimes(api, status):
85 the_past = data_dict["the_past"] 85 the_past = data_dict["the_past"]
86 the_future = data_dict["the_future"] 86 the_future = data_dict["the_future"]
87 the_far_future = data_dict["the_far_future"] 87 the_far_future = data_dict["the_far_future"]
88 print("restoring from dict\n", the_past, the_future, the_far_future)
88 else: 89 else:
89 the_past = datetime.datetime.now() - datetime.timedelta(seconds=20) 90 epoch_time = datetime.datetime.now().timestamp()
90 the_future = datetime.datetime.now() + datetime.timedelta(seconds=20) 91 now = datetime.datetime.fromtimestamp(epoch_time)
91 the_far_future = datetime.datetime.now() + datetime.timedelta(seconds=40) 92 the_past = now - datetime.timedelta(seconds=20)
93 the_future = now + datetime.timedelta(seconds=20)
94 the_far_future = now + datetime.timedelta(seconds=40)
92 pickle.dump({ 95 pickle.dump({
93 "the_past": the_past, 96 "the_past": the_past,
94 "the_future": the_future, 97 "the_future": the_future,
Powered by cgit v1.2.3 (git 2.41.0)