'Build an expected result tree given a topic id, display name, and
children'

def make_expected_tree(self, topic_id, name, children=None):

    topic_id_list = ([topic_id] if topic_id else [child['id'] for child in children])
    children = (children or [])
    node = {'id': topic_id, 'name': name, 'children': children, 'thread_list_url': self.get_thread_list_url(topic_id_list)}
    return node
