Exemple #1
0
    def test_todos_in_week(self):
        week = model.Week(2011)
        self.assertEqual(len(model.find_todos_in_week(week)), 0)

        day = model.Day(datetime.date(year=2011, month=11, day=5))
        week.entries.append(day)
        self.assertEqual(len(model.find_todos_in_week(week)), 0)

        todo = model.DayTodo("yup")
        day.entries.append(todo)

        self.assertEqual(len(model.find_todos_in_week(week)), 1)