fixed remaining test: they failed much less often
This commit is contained in:
parent
bd257f3004
commit
0599193ba5
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue