From: Tomas Babej Date: Sat, 26 Dec 2015 15:58:40 +0000 (+0100) Subject: tests: Add test for equality of the recurrence parents X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/578adfd8dd1bda7bbf535719371381f9a3794a1e?ds=inline;hp=-c tests: Add test for equality of the recurrence parents --- 578adfd8dd1bda7bbf535719371381f9a3794a1e diff --git a/tasklib/tests.py b/tasklib/tests.py index 874a047..b0e342d 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -745,6 +745,15 @@ class TaskTest(TasklibTest): t.save() self.assertEqual(len(self.tw.tasks.pending()), 2) + def test_spawned_task_parent(self): + today = datetime.date.today() + t = Task(self.tw, description="brush teeth", + due=today, recur="daily") + t.save() + + spawned = self.tw.tasks.pending().get(due=today) + assert spawned['parent'] == t + def test_modify_number_of_tasks_at_once(self): for i in range(1, 100): Task(self.tw, description="test task %d" % i, tags=['test']).save()