Пример #1
0
 def test_simple_done(self):
     """Simple done - no date"""
     task_str = "x foo bar baz +proj1 +proj2 @context foo:bar"
     task = Task("foo bar baz", projects=['+proj1', '+proj2'],
                  contexts=['@context'], tags={'foo':'bar'})
     task.done = True
     self.assertEqual(str(task), task_str)
Пример #2
0
 def test_dated_done(self):
     """Dated done"""
     task_str = "x 2010-10-01 foo bar baz +proj1 +proj2 @context foo:bar"
     task = Task("foo bar baz", projects=['+proj1', '+proj2'],
                  contexts=['@context'], tags={'foo':'bar'})
     task.done = True
     task.finish = date(2010,10,1)
     self.assertEqual(str(task), task_str)
Пример #3
0
 def test_create_finish(self):
     """create and finish dates come out right"""
     task_str = "x 2010-10-01 2010-09-05 foo bar baz +proj1 +proj2 @context foo:bar"
     task = Task("foo bar baz", projects=['+proj1', '+proj2'],
                  contexts=['@context'], tags={'foo':'bar'})
     task.done = True
     task.finish = date(2010,10,1)
     task.create = date(2010,9,5)
     self.assertEqual(str(task), task_str)