tests: Fix trivial sorting issue

We've seen an ordering issue pop up occasionally in the CI. Resolve it.

Change-Id: I4dd10268b673c260ac0894fac92cd8bea9e626f4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2024-04-25 10:20:59 +01:00
parent a79cb608b0
commit 837a3dc015
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)