test(parse_duration): add tests for seconds

This commit is contained in:
sgerodes 2025-01-08 16:50:29 +01:00
parent a555c13f38
commit 875f7fa47e

View File

@ -81,6 +81,8 @@ class TimeFormat(unittest.TestCase, TimezoneMixin):
DAY = 24*60*60
MONTH = 31*DAY
YEAR = 365*DAY
self.failUnlessEqual(p("1s"), 1)
self.failUnlessEqual(p("86400s"), DAY)
self.failUnlessEqual(p("1 day"), DAY)
self.failUnlessEqual(p("2 days"), 2*DAY)
self.failUnlessEqual(p("3 months"), 3*MONTH)