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

def test_0110_reset_metadata_on_all_repositories(self):

    self.login(email=common.admin_email, username=common.admin_username)
    old_metadata = dict()
    new_metadata = dict()
    repositories = self.test_db_util.get_all_repositories()
    for repository in repositories:
        old_metadata[self.security.encode_id(repository.id)] = dict()
        for metadata in self.get_repository_metadata(repository):
            old_metadata[self.security.encode_id(repository.id)][metadata.changeset_revision] = metadata.metadata
    self.reset_metadata_on_selected_repositories(list(old_metadata.keys()))
    for repository in repositories:
        new_metadata[self.security.encode_id(repository.id)] = dict()
        for metadata in self.get_repository_metadata(repository):
            new_metadata[self.security.encode_id(repository.id)][metadata.changeset_revision] = metadata.metadata
        if (old_metadata[self.security.encode_id(repository.id)] != new_metadata[self.security.encode_id(repository.id)]):
            raise AssertionError(('Metadata    changed    after    reset    for    repository    %s.' % repository.name))
