def check_users_exist(self, usernames): """ Returns True if all users exist """ gitlab_user_names = set([i['username'] for i in self.get_all_users()]) translated = [] for i in usernames: print(i, redmine_username_to_gitlab_username(i)) translated.append(redmine_username_to_gitlab_username(i)) return all((i in gitlab_user_names for i in translated))
def check_users_exist(self, usernames): """ Returns True if all users exist """ gitlab_user_names = set([i['username'] for i in self.get_all_users()]) translated = [] for i in usernames: print(i, redmine_username_to_gitlab_username(i)) translated.append(redmine_username_to_gitlab_username(i)) return all((i in gitlab_user_names for i in translated))