One thing I was taught was helpful was a do_everything method. I can feed in a board to act as a template for it to construct all the things I want.
It will take all the lists and make them boards, add labels to boards, add lists to boards, add cards to the lists on the new boards, and add labels to those cards.
The great thing is that I just call these functions. As long as I maintain the inputs and outputs I can update or change them however I want and it won’t (hopefully) break things.
def do_everything(master_board): new_boards = convert_lists_to_boards(master_board, client) new_lists = create_lists_on_new_boards(new_boards) add_labels_to_boards(master_board, new_boards) new_cards = create_cards_on_new_lists(master_board, new_boards, new_lists) list_of_labeled_cards = add_labels_to_cards(new_boards) return(list_of_labeled_cards)
I call this for every test.