X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/326572cba39486dabb87526073f259550072fe1a..3183652e5dd661da1569c758f6a3f2fb7fe9fd27:/tasklib/tests.py?ds=sidebyside diff --git a/tasklib/tests.py b/tasklib/tests.py index 3931e1f..a78f25c 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -318,6 +318,18 @@ class TaskTest(TasklibTest): self.assertTrue(now.replace(microsecond=0) <= t['end']) self.assertEqual(t['status'], 'deleted') + def test_started_task_active(self): + t = Task(self.tw, description="test task") + t.save() + t.start() + self.assertTrue(t.active) + + def test_unstarted_task_inactive(self): + t = Task(self.tw, description="test task") + self.assertFalse(t.active) + t.save() + self.assertFalse(t.active) + def test_modify_simple_attribute_without_space(self): t = Task(self.tw, description="test") t.save() @@ -930,6 +942,11 @@ class UnicodeTest(TasklibTest): Task(self.tw, description="†åßk").save() self.tw.tasks.get() + def test_filter_by_unicode_task(self): + Task(self.tw, description="†åßk").save() + tasks = self.tw.tasks.filter(description="†åßk") + self.assertEqual(len(tasks), 1) + def test_non_unicode_task(self): Task(self.tw, description="test task").save() self.tw.tasks.get()