From: Tomas Babej Date: Fri, 2 Jan 2015 05:23:30 +0000 (+0100) Subject: Tests: Adds tests for adding attributes with spaces X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/228ef69b3f641c8bb81d7377977b9b57855f8572?ds=inline Tests: Adds tests for adding attributes with spaces --- 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())