Exemple #1
0
    def test_isCompleted_sub(self):
        todo = ToDo()
        self.assertEqual(todo.isCompleted(), False)

        todo.setCompleted()
        self.assertEqual(todo.isCompleted(), True)

        child = todo.addSubtodo(ToDo())
        self.assertEqual(todo.isCompleted(), False)

        child.setCompleted()
        self.assertEqual(todo.isCompleted(), True)
        self.assertEqual(child.isCompleted(), True)
Exemple #2
0
    def test_isCompleted(self):
        todo = ToDo()
        self.assertEqual(todo.isCompleted(), False)

        todo.setCompleted()
        self.assertEqual(todo.isCompleted(), True)