def test_is_complete(self): item = todo.TodoItem("summary1") item.set_status(todo.TodoStatus.TODO) self.assertFalse(item.is_complete()) item.set_status(todo.TodoStatus.INPROGRESS) self.assertFalse(item.is_complete()) item.set_status(todo.TodoStatus.ABANDON) self.assertFalse(item.is_complete()) item.set_status(todo.TodoStatus.DONE) self.assertTrue(item.is_complete())
def test_complete_sets_status(self): item = todo.TodoItem("summary") item.complete() self.assertEqual(todo.TodoStatus.DONE, item.status())
def test_abandon_sets_status(self): item = todo.TodoItem("summary") item.abandon() self.assertEqual(todo.TodoStatus.ABANDON, item.status())
def test_inprogress_sets_status(self): item = todo.TodoItem("summary") item.inprogress() self.assertEqual(todo.TodoStatus.INPROGRESS, item.status())
def test_todo_sets_status(self): item = todo.TodoItem("summary") item.set_status(todo.TodoStatus.DONE) item.todo() self.assertEqual(todo.TodoStatus.TODO, item.status())
def test_set_status_sets_status(self): item = todo.TodoItem("summary1") status1 = todo.TodoStatus.ABANDON item.set_status(status1) self.assertEqual(status1, item.status())
def test_new_item_status_is_todo(self): item = todo.TodoItem("summary1") self.assertEqual(todo.TodoStatus.TODO, item.status())
def test_set_summary(self): summary1 = "test summary 1" summary2 = "test summary 2" item = todo.TodoItem(summary1) item.set_summary(summary2) self.assertEqual(summary2, item.description())
def test_new_item_sets_summary(self): summary1 = "test summary" item = todo.TodoItem(summary1) self.assertEqual(summary1, item.description())