'Set up the dependency structure.'

def test_0040_create_and_upload_dependency_definitions(self):

    global running_standalone
    if running_standalone:
        column_repository = self.test_db_util.get_repository_by_name_and_owner(column_repository_name, common.test_user_1_name)
        convert_repository = self.test_db_util.get_repository_by_name_and_owner(convert_repository_name, common.test_user_1_name)
        datatypes_repository = self.test_db_util.get_repository_by_name_and_owner(emboss_datatypes_repository_name, common.test_user_1_name)
        emboss_repository = self.test_db_util.get_repository_by_name_and_owner(emboss_repository_name, common.test_user_1_name)
        filtering_repository = self.test_db_util.get_repository_by_name_and_owner(filtering_repository_name, common.test_user_1_name)
        freebayes_repository = self.test_db_util.get_repository_by_name_and_owner(freebayes_repository_name, common.test_user_1_name)
        bismark_repository = self.test_db_util.get_repository_by_name_and_owner(bismark_repository_name, common.test_user_1_name)
        dependency_xml_path = self.generate_temp_path('test_1050', additional_paths=['dependencies'])
        column_tuple = (self.url, column_repository.name, column_repository.user.username, self.get_repository_tip(column_repository))
        convert_tuple = (self.url, convert_repository.name, convert_repository.user.username, self.get_repository_tip(convert_repository))
        freebayes_tuple = (self.url, freebayes_repository.name, freebayes_repository.user.username, self.get_repository_tip(freebayes_repository))
        emboss_tuple = (self.url, emboss_repository.name, emboss_repository.user.username, self.get_repository_tip(emboss_repository))
        datatypes_tuple = (self.url, datatypes_repository.name, datatypes_repository.user.username, self.get_repository_tip(datatypes_repository))
        bismark_tuple = (self.url, bismark_repository.name, bismark_repository.user.username, self.get_repository_tip(bismark_repository))
        self.create_repository_dependency(repository=convert_repository, repository_tuples=[column_tuple], filepath=dependency_xml_path)
        self.create_repository_dependency(repository=column_repository, repository_tuples=[convert_tuple], filepath=dependency_xml_path)
        self.create_repository_dependency(repository=datatypes_repository, repository_tuples=[bismark_tuple], filepath=dependency_xml_path)
        self.create_repository_dependency(repository=emboss_repository, repository_tuples=[datatypes_tuple], filepath=dependency_xml_path)
        self.create_repository_dependency(repository=freebayes_repository, repository_tuples=[freebayes_tuple, datatypes_tuple, emboss_tuple, column_tuple], filepath=dependency_xml_path)
        self.create_repository_dependency(repository=filtering_repository, repository_tuples=[emboss_tuple], filepath=dependency_xml_path)
