X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/a12e28c3cef94409801bea964ccc1e3db677a0cf..e752d2ead6e9e8304f5d035ec826ca290e26fc51:/tasklib/tests.py?ds=sidebyside 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",