Commit 9d5b4b84 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Add test.

parent 76080111
......@@ -39,7 +39,7 @@ class TodoListTester(unittest.TestCase):
self.todolist.add('')
self.assertEquals(str(self.todolist), text)
def test_add3(self):
def test_add3a(self):
count = self.todolist.count()
self.todolist.add('\n(C) New task')
......@@ -47,6 +47,14 @@ class TodoListTester(unittest.TestCase):
self.assertEqual(self.todolist.todo(count + 1).source(), '(C) New task')
self.assertEqual(self.todolist.todo(count + 1).priority(), 'C')
def test_add3b(self):
count = self.todolist.count()
self.todolist.add('(C) New task\n')
self.assertEqual(self.todolist.count(), count + 1)
self.assertEqual(self.todolist.todo(count + 1).source(), '(C) New task')
self.assertEqual(self.todolist.todo(count + 1).priority(), 'C')
def test_add4(self):
text = str(self.todolist)
self.todolist.add(' ')
......
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