diff options
Diffstat (limited to 'tests/test_timeline.py')
-rw-r--r-- | tests/test_timeline.py | 9 |
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, |