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'] = []
obj.tags = []
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
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.
kwargs = {
'name': 'qwerty',
'tags': list(set(['tag1', 'tag2', 'tag3', 'foo'])),
'tags': sorted(set(['tag1', 'tag2', 'tag3', 'foo'])),
}
# ProjectManager.update(project, name=, domain=, description=,
# enabled=, **kwargs)