X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/1d0bf81f05088c7cb32af462d2813f004a3154b3..faa9531194cd3657ce1e2f40e6e8067ac546958c:/tasklib/tests.py diff --git a/tasklib/tests.py b/tasklib/tests.py index 8103562..72aebb9 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -114,6 +114,29 @@ class TaskTest(TasklibTest): self.assertRaises(Task.DeletedTask, t.done) + def test_modify_simple_attribute_without_space(self): + t = Task(self.tw, description="test") + t.save() + + self.assertEquals(t['description'], "test") + + t['description'] = "test-modified" + t.save() + + self.assertEquals(t['description'], "test-modified") + + def test_modify_simple_attribute_with_space(self): + # Space can pose problems with parsing + t = Task(self.tw, description="test task") + t.save() + + self.assertEquals(t['description'], "test task") + + t['description'] = "test task modified" + t.save() + + self.assertEquals(t['description'], "test task modified") + def test_empty_dependency_set_of_unsaved_task(self): t = Task(self.tw, description="test task") self.assertEqual(t['depends'], set())