From 578adfd8dd1bda7bbf535719371381f9a3794a1e Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 26 Dec 2015 16:58:40 +0100 Subject: [PATCH] tests: Add test for equality of the recurrence parents --- tasklib/tests.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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() -- 2.39.5