Show More
@@ -129,6 +129,8 b' class TestLibs(unittest.TestCase):' | |||
|
129 | 129 | self.assertEqual(age(n - delt(hours=1)), u'1 hour ago') |
|
130 | 130 | self.assertEqual(age(n - delt(hours=24)), u'1 day ago') |
|
131 | 131 | self.assertEqual(age(n - delt(hours=24 * 5)), u'5 days ago') |
|
132 | self.assertEqual(age(n - delt(hours=24 * (calendar.mdays[n.month - 1]))), | |
|
133 | u'1 month ago') | |
|
132 | 134 | self.assertEqual(age(n - delt(hours=24 * (calendar.mdays[n.month - 1] + 2))), |
|
133 | 135 | u'1 month and 2 days ago') |
|
134 | 136 | self.assertEqual(age(n - delt(hours=24 * 400)), u'1 year and 1 month ago') |
@@ -144,7 +146,9 b' class TestLibs(unittest.TestCase):' | |||
|
144 | 146 | self.assertEqual(age(n + delt(hours=1)), u'in 1 hour') |
|
145 | 147 | self.assertEqual(age(n + delt(hours=24)), u'in 1 day') |
|
146 | 148 | self.assertEqual(age(n + delt(hours=24 * 5)), u'in 5 days') |
|
147 |
self.assertEqual(age(n + delt(hours=24 * (calendar.mdays[n.month |
|
|
149 | self.assertEqual(age(n + delt(hours=24 * (calendar.mdays[n.month]))), | |
|
150 | u'in 1 month') | |
|
151 | self.assertEqual(age(n + delt(hours=24 * (calendar.mdays[n.month] + 1))), | |
|
148 | 152 | u'in 1 month and 1 day') |
|
149 | 153 | self.assertEqual(age(n + delt(hours=24 * 400)), u'in 1 year and 1 month') |
|
150 | 154 |
General Comments 0
You need to be logged in to leave comments.
Login now