tests: Add test for relative date formatting

This commit is contained in:
Tomas Babej 2015-12-28 14:47:13 +01:00 committed by Paul Beckingham
parent c25a7ff085
commit 8dcdeeac8b

View file

@ -381,6 +381,12 @@ class TestDateFormats(TestCase):
self.assertRegexpMatches(out, r'1')
self.assertRegexpMatches(out, r'2\s+\d+\S+')
def test_date_format_relative(self):
"""Verify due.relative formatting"""
code, out, err = self.t("xxx rc.report.xxx.columns:id,due.relative")
self.assertRegexpMatches(out, r'1\s+-[0-9.]+d')
self.assertRegexpMatches(out, r'2\s+[0-9.]+h')
def test_date_format_countdown(self):
"""Verify due.countdown formatting"""
code, out, err = self.t("xxx rc.report.xxx.columns:id,due.countdown")