X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/a12e28c3cef94409801bea964ccc1e3db677a0cf..42baab3573bc84a4663c538afb0280787db952f1:/tasklib/tests.py?ds=inline diff --git a/tasklib/tests.py b/tasklib/tests.py index b33fd59..adcb3c8 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -330,6 +330,12 @@ class TaskTest(TasklibTest): t.save() self.assertFalse(t.active) + def test_start_active_task(self): + t = Task(self.tw, description="test task") + t.save() + t.start() + self.assertRaises(Task.ActiveTask, t.start) + def test_stop_completed_task(self): t = Task(self.tw, description="test task") t.save() @@ -739,6 +745,7 @@ class TaskFromHookTest(TasklibTest): '{"description":"Buy some milk",' '"entry":"20141118T050231Z",' '"status":"pending",' + '"start":"20141119T152233Z",' '"uuid":"a360fc44-315c-4366-b70c-ea7e7520b749"}') input_modify_data = six.StringIO(input_add_data.getvalue() + '\n' + @@ -767,7 +774,7 @@ class TaskFromHookTest(TasklibTest): self.assertEqual(t._original_data['status'], "pending") self.assertEqual(t._original_data['description'], "Buy some milk") self.assertEqual(set(t._modified_fields), - set(['status', 'description'])) + set(['status', 'description', 'start'])) def test_export_data(self): t = Task(self.tw, description="test task",