From ce0455c6318ad4623f10a0d35aea2d929fc57fdd Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Mon, 23 May 2016 15:35:33 +0200 Subject: [PATCH 1/1] tests: Expand test suite with tests for recurring native filters --- tasklib/tests.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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() -- 2.39.5