def invalid_tree(invalid_channel, invalid_topic, invalid_document): invalid_topic.add_child(invalid_document) invalid_channel.add_child(invalid_topic) return ChannelManager(invalid_channel)
def invalid_tree_2(channel, topic, invalid_document): channel_copy = copy.deepcopy(channel) topic_copy = copy.deepcopy(topic) topic_copy.add_child(invalid_document) channel_copy.add_child(topic_copy) return ChannelManager(channel_copy)
def tree(channel, topic, document): topic.add_child(document) channel.add_child(topic) return ChannelManager(channel)