Commit c0ab5647 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Add test to check consistency of graph after removing a todo.

parent d646eda9
...@@ -78,7 +78,7 @@ class TodoListTester(unittest.TestCase): ...@@ -78,7 +78,7 @@ class TodoListTester(unittest.TestCase):
"(C) Baz @Context1 +Project1 key:value") "(C) Baz @Context1 +Project1 key:value")
self.assertEquals(self.todolist.count(), count - 1) self.assertEquals(self.todolist.count(), count - 1)
self.assertTrue(self.todolist.is_dirty()) self.assertTrue(self.todolist.is_dirty())
self.assertRaises(KeyError, self.todolist.number, todo) self.assertRaises(ValueError, self.todolist.number, todo)
def test_delete2(self): def test_delete2(self):
count = self.todolist.count() count = self.todolist.count()
...@@ -218,6 +218,10 @@ class TodoListDependencyTester(unittest.TestCase): ...@@ -218,6 +218,10 @@ class TodoListDependencyTester(unittest.TestCase):
self.assertEquals(str(self.todolist), old) self.assertEquals(str(self.todolist), old)
def test_remove_todo_check_children(self):
self.todolist.delete(2)
self.assertTrue(self.todolist.children(2))
def test_remove_task(self): def test_remove_task(self):
self.todolist.delete(3) self.todolist.delete(3)
self.assertFalse(self.todolist.todo(3).has_tag('p', '2')) self.assertFalse(self.todolist.todo(3).has_tag('p', '2'))
......
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