Example #1
0
def daily_update():
    client = create_client()
    logger.info('Loading board...')
    chores_board = client.load_board(chore_board_matcher)
    now = datetime.utcnow().replace(tzinfo=pytz.utc)
    logger.info('Updating game...')
    update_game(get_todo_lists(chores_board), now)
    logger.info('Updating chores...')
    update_chores(chores_board, now)
Example #2
0
    def test_get_todo_lists(self):
        todo_lists = [
            List('todo'),
            List('to do'),
            List('ToDo'),
            List('To Do'),
            List('Inigo - todo'),
            List('to do - Wesley'),
        ]
        other_lists = [
            List('done'),
            List('Buttercup'),
        ]
        board = Board(lists=todo_lists + other_lists)

        result = get_todo_lists(board)

        self.assertListEqual(result, todo_lists)