'Reset metadata on all repositories, then verify that it has not changed.'

def test_9905_reset_metadata_on_all_repositories(self):

    repository_metadata = dict()
    repositories = self.test_db_util.get_all_installed_repositories(actually_installed=True)
    for repository in repositories:
        repository_metadata[self.security.encode_id(repository.id)] = repository.metadata
    self.reset_metadata_on_selected_installed_repositories(list(repository_metadata.keys()))
    for repository in repositories:
        self.test_db_util.ga_refresh(repository)
        old_metadata = repository_metadata[self.security.encode_id(repository.id)]
        if (('tool_panel_section' in old_metadata) and ('tool_panel_section' not in repository.metadata)):
            del old_metadata['tool_panel_section']
        assert (repository.metadata == old_metadata), ('Metadata    for    %s    repository    %s    changed    after    reset.    \nOld:    %s\nNew:    %s' % (repository.status, repository.name, old_metadata, repository.metadata))
