X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/2613912534bba4a68e19a76752971ac75063654b..80d39e1f7bea06adf9df0f4f6a7d12f355b3a1ad:/tasklib/tests.py?ds=inline diff --git a/tasklib/tests.py b/tasklib/tests.py index ca2ff4a..3656bbf 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -81,6 +81,30 @@ class TaskFilterTest(TasklibTest): self.tw.tasks.all()[0].done() self.assertEqual(len(self.tw.tasks.completed()), 1) + def test_deleted_empty(self): + Task(self.tw, description="test task").save() + self.assertEqual(len(self.tw.tasks.deleted()), 0) + + def test_deleted_non_empty(self): + Task(self.tw, description="test task").save() + self.assertEqual(len(self.tw.tasks.deleted()), 0) + self.tw.tasks.all()[0].delete() + self.assertEqual(len(self.tw.tasks.deleted()), 1) + + def test_waiting_empty(self): + Task(self.tw, description="test task").save() + self.assertEqual(len(self.tw.tasks.waiting()), 0) + + def test_waiting_non_empty(self): + Task(self.tw, description="test task").save() + self.assertEqual(len(self.tw.tasks.waiting()), 0) + + t = self.tw.tasks.all()[0] + t['wait'] = 'tomorrow' + t.save() + + self.assertEqual(len(self.tw.tasks.waiting()), 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()