diff --git a/test_archivemail b/test_archivemail index dd68318..4f90519 100755 --- a/test_archivemail +++ b/test_archivemail @@ -501,15 +501,17 @@ class TestOptionParser(unittest.TestCase): class TestIsTooOld(unittest.TestCase): def testVeryOld(self): """with max_days=360, should be true for these dates > 1 year""" + ctime = time.time() for years in range(1, 10): - time_msg = time.time() - (years * 365 * 24 * 60 * 60) + time_msg = ctime - (years * 365 * 24 * 60 * 60) assert archivemail.is_older_than_days(time_message=time_msg, max_days=360) def testOld(self): """with max_days=14, should be true for these dates > 14 days""" + ctime = time.time() for days in range(14, 360): - time_msg = time.time() - (days * 24 * 60 * 60) + time_msg = ctime - (days * 24 * 60 * 60) assert archivemail.is_older_than_days(time_message=time_msg, max_days=14)