Commit 4daa59e3 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Add test for set_text.

parent de1dca40
......@@ -186,5 +186,14 @@ class TodoBaseTester(unittest.TestCase):
self.assertEquals(todo.fields['completionDate'], today)
self.assertTrue(re.match('^x ' + today_str + ' 2014-06-12 Foo', todo.src))
def test_set_text(self):
todo = TodoBase.TodoBase("(B) Foo")
new_text = "(C) Foo"
todo.set_text(new_text)
self.assertEquals(todo.src, new_text)
self.assertEquals(todo.priority(),'C')
if __name__ == '__main__':
unittest.main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment