Beispiel #1
0
 def test_decimals(self):
     sources = [Source(FakeSource([Task('task id:9'), Task('task id:12')]))]
     sources[0].update_contexts_and_projects()
     nextid = utils.new_task_id(sources)
     self.assertEqual(nextid, '13')
Beispiel #2
0
 def test_prefix_existing(self):
     nextid = utils.new_task_id(self.sources, 'prefixed')
     self.assertEqual(nextid, 'prefixed23')
Beispiel #3
0
 def test_no_prefix_existing(self):
     nextid = utils.new_task_id(self.sources)
     self.assertEqual(nextid, '42')
Beispiel #4
0
 def test_prefix_no_existing(self):
     nextid = utils.new_task_id(self.sources, 'project')
     self.assertEqual(nextid, 'project1')
Beispiel #5
0
 def test_no_prefix_no_existing(self):
     sources = [Source(FakeSource([]))]
     sources[0].update_contexts_and_projects()
     nextid = utils.new_task_id(sources)
     self.assertEqual(nextid, '1')