Beispiel #1
0
 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())
Beispiel #2
0
 def test_complete_sets_status(self):
     item = todo.TodoItem("summary")
     item.complete()
     self.assertEqual(todo.TodoStatus.DONE, item.status())
Beispiel #3
0
 def test_abandon_sets_status(self):
     item = todo.TodoItem("summary")
     item.abandon()
     self.assertEqual(todo.TodoStatus.ABANDON, item.status())
Beispiel #4
0
 def test_inprogress_sets_status(self):
     item = todo.TodoItem("summary")
     item.inprogress()
     self.assertEqual(todo.TodoStatus.INPROGRESS, item.status())
Beispiel #5
0
 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())
Beispiel #6
0
 def test_set_status_sets_status(self):
     item = todo.TodoItem("summary1")
     status1 = todo.TodoStatus.ABANDON
     item.set_status(status1)
     self.assertEqual(status1, item.status())
Beispiel #7
0
 def test_new_item_status_is_todo(self):
     item = todo.TodoItem("summary1")
     self.assertEqual(todo.TodoStatus.TODO, item.status())
Beispiel #8
0
 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())
Beispiel #9
0
 def test_new_item_sets_summary(self):
     summary1 = "test summary"
     item = todo.TodoItem(summary1)
     self.assertEqual(summary1, item.description())