fixed test: time.time() resolution too low

This commit is contained in:
Michael Krayer 2020-05-22 11:06:31 +02:00
parent 62dc691279
commit bd257f3004
1 changed files with 2 additions and 1 deletions

View File

@ -515,8 +515,9 @@ class TestIsTooOld(unittest.TestCase):
def testJustOld(self):
"""with max_days=1, should be true for these dates >= 1 day"""
ctime = time.time()
for minutes in range(0, 61):
time_msg = time.time() - (25 * 60 * 60) + (minutes * 60)
time_msg = ctime - (25 * 60 * 60) + (minutes * 60)
assert archivemail.is_older_than_days(time_message=time_msg,
max_days=1)