def test_21(self): # Test task with a valid due time corner case task = tasklib.Task('this is my task due:2014-04-01T23:59') self.assertEqual( self.htmlizer.task2html(task), '<tt> </tt> this is my task <b>' '<font style="color:red">due:2014-04-01 23:59</font></b>')
def test_18(self): # Test task with space in due time instead of T. This is valid, but gives an unexpected result task = tasklib.Task('this is my task due:2014-04-01 12:34') self.assertEqual( self.htmlizer.task2html(task), '<tt> </tt> this is my task <b>' '<font style="color:red">due:2014-04-01</font></b> 12:34')
def test_02(self): # Test task with a single context at the end task = tasklib.Task('this is my task @context') self.assertEqual( self.htmlizer.task2html(task), '<tt> </tt> this is my task <font style="color:green">@context</font>' )
def test_13(self): # Test task with a valid due date and time task = tasklib.Task('this is my task due:2014-04-01T12:34') self.assertEqual( self.htmlizer.task2html(task), '<tt> </tt> this is my task <b>' '<font style="color:red">due:2014-04-01 12:34</font></b>')
def test_22(self): # Test task with an invalid due time corner case task = tasklib.Task('this is my task due:2014-04-01T24:00') self.assertEqual( self.htmlizer.task2html(task), '<tt> </tt> this is my task <b>' '<font style="color:red">*** due:2014-04-01T24:00 Invalid date format, ' 'expected yyyy-mm-dd or yyyy-mm-ddThh:mm. ***</font></b>')
def test_14(self): # Test task with an invalid due date task = tasklib.Task('this is my task due:abc') self.assertEqual( self.htmlizer.task2html(task), '<tt> </tt> this is my task <b>' '<font style="color:red">*** due:abc Invalid date format, ' 'expected yyyy-mm-dd or yyyy-mm-ddThh:mm. ***</font></b>')