Skip to content

Commit 3950b4f

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "tests: Fix trivial sorting issue"
2 parents ee23995 + 837a3dc commit 3950b4f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

openstackclient/identity/v3/tag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def update_tags_in_args(parsed_args, obj, args):
129129
args['tags'] = []
130130
obj.tags = []
131131
if parsed_args.remove_tag:
132-
args['tags'] = list(set(obj.tags) - set(parsed_args.remove_tag))
132+
args['tags'] = sorted(set(obj.tags) - set(parsed_args.remove_tag))
133133
return
134134
if parsed_args.tags:
135-
args['tags'] = list(set(obj.tags).union(set(parsed_args.tags)))
135+
args['tags'] = sorted(set(obj.tags).union(set(parsed_args.tags)))

openstackclient/tests/unit/identity/v3/test_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ def test_project_set_tags(self):
11301130
# Set expected values. new tag is added to original tags for update.
11311131
kwargs = {
11321132
'name': 'qwerty',
1133-
'tags': list(set(['tag1', 'tag2', 'tag3', 'foo'])),
1133+
'tags': sorted(set(['tag1', 'tag2', 'tag3', 'foo'])),
11341134
}
11351135
# ProjectManager.update(project, name=, domain=, description=,
11361136
# enabled=, **kwargs)

0 commit comments

Comments
 (0)