From: Tomas Babej Date: Sun, 22 Mar 2015 19:59:10 +0000 (+0100) Subject: tests: Add tests for Task active property X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/033ea1c349a1c8255667e9399e1dd41595863a6b?ds=sidebyside;hp=-c tests: Add tests for Task active property --- 033ea1c349a1c8255667e9399e1dd41595863a6b diff --git a/tasklib/tests.py b/tasklib/tests.py index 3931e1f..59bd78a 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -318,6 +318,18 @@ class TaskTest(TasklibTest): self.assertTrue(now.replace(microsecond=0) <= t['end']) self.assertEqual(t['status'], 'deleted') + def test_started_task_active(self): + t = Task(self.tw, description="test task") + t.save() + t.start() + self.assertTrue(t.active) + + def test_unstarted_task_inactive(self): + t = Task(self.tw, description="test task") + self.assertFalse(t.active) + t.save() + self.assertFalse(t.active) + def test_modify_simple_attribute_without_space(self): t = Task(self.tw, description="test") t.save()