def test_seconds_until_midnight(self):
arg_list = [
"2017-05-29 23:59:59",
"2017-05-29 00:00:00",
"2017-05-29 00:00:01"
]
expected = [
1,
0,
86399
]
for idx, arg in enumerate(arg_list):
with freeze_time(arg):
self.assertEqual(
how_many_seconds_until_midnight(),
expected[idx]
)
评论列表
文章目录