From: Tomas Babej Date: Mon, 23 May 2016 13:35:33 +0000 (+0200) Subject: tests: Expand test suite with tests for recurring native filters X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/ce0455c6318ad4623f10a0d35aea2d929fc57fdd?ds=sidebyside;hp=-c tests: Expand test suite with tests for recurring native filters --- ce0455c6318ad4623f10a0d35aea2d929fc57fdd diff --git a/tasklib/tests.py b/tasklib/tests.py index 5a8f576..77f1980 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -105,6 +105,15 @@ class TaskFilterTest(TasklibTest): self.assertEqual(len(self.tw.tasks.waiting()), 1) + def test_recurring_empty(self): + Task(self.tw, description="test task").save() + self.assertEqual(len(self.tw.tasks.recurring()), 0) + + def test_recurring_non_empty(self): + Task(self.tw, description="test task", recur="daily", + due=datetime.datetime.now()).save() + self.assertEqual(len(self.tw.tasks.recurring()), 1) + def test_filtering_by_attribute(self): Task(self.tw, description="no priority task").save() Task(self.tw, priority="H", description="high priority task").save()