From 033ea1c349a1c8255667e9399e1dd41595863a6b Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sun, 22 Mar 2015 20:59:10 +0100 Subject: [PATCH] tests: Add tests for Task active property --- tasklib/tests.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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() -- 2.39.5