Merge "tests: Fix trivial sorting issue"

This commit is contained in:
Zuul 2024-04-26 13:08:00 +00:00 committed by Gerrit Code Review
commit 3950b4f7ce
2 changed files with 3 additions and 3 deletions

View File

@ -129,7 +129,7 @@ def update_tags_in_args(parsed_args, obj, args):
args['tags'] = [] args['tags'] = []
obj.tags = [] obj.tags = []
if parsed_args.remove_tag: if parsed_args.remove_tag:
args['tags'] = list(set(obj.tags) - set(parsed_args.remove_tag)) args['tags'] = sorted(set(obj.tags) - set(parsed_args.remove_tag))
return return
if parsed_args.tags: if parsed_args.tags:
args['tags'] = list(set(obj.tags).union(set(parsed_args.tags))) args['tags'] = sorted(set(obj.tags).union(set(parsed_args.tags)))

View File

@ -1130,7 +1130,7 @@ class TestProjectSet(TestProject):
# Set expected values. new tag is added to original tags for update. # Set expected values. new tag is added to original tags for update.
kwargs = { kwargs = {
'name': 'qwerty', 'name': 'qwerty',
'tags': list(set(['tag1', 'tag2', 'tag3', 'foo'])), 'tags': sorted(set(['tag1', 'tag2', 'tag3', 'foo'])),
} }
# ProjectManager.update(project, name=, domain=, description=, # ProjectManager.update(project, name=, domain=, description=,
# enabled=, **kwargs) # enabled=, **kwargs)