'Delete the tool_dependencies.xml from bwa_base_0440.'

def test_0050_delete_complex_repository_dependency(self):

    '\n                                We    are    at    complex    repository    dependencies,    step    5    -    Delete    tool_dependencies.xml    from    bwa_base_0440,\n                                and    make    sure    bwa_base_0440    now    has    two    installable    revisions:    1    and    2\n                                '
    repository = self.test_db_util.get_repository_by_name_and_owner(bwa_base_repository_name, common.test_user_1_name)
    old_changeset_revision = self.get_repository_tip(repository)
    self.delete_files_from_repository(repository, filenames=['tool_dependencies.xml'])
    new_changeset_revision = self.get_repository_tip(repository)
    metadata_record = self.get_repository_metadata_by_changeset_revision(repository, old_changeset_revision)
    assert metadata_record.downloadable, ('The    revision    of    %s    that    contains    tool_dependencies.xml    is    no    longer    downloadable.' % repository.name)
    metadata_record = self.get_repository_metadata_by_changeset_revision(repository, new_changeset_revision)
    assert metadata_record.downloadable, ('The    revision    of    %s    that    does    not    contain    tool_dependencies.xml    is    not    downloadable.' % repository.name)
    assert (len(repository.downloadable_revisions) == 2), ('Repository    %s    has    %d    downloadable    revisions,    expected    2.' % (repository.name, len(repository.downloadable_revisions)))
