mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-21 23:29:47 +00:00
Merge pull request #186 from tipabu/check-grant-ordering
Care less about ordering when checking grants Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
commit
0826df92d2
1 changed files with 2 additions and 2 deletions
|
@ -81,8 +81,8 @@ def check_grants(got, want):
|
|||
in any order.
|
||||
"""
|
||||
eq(len(got), len(want))
|
||||
got = sorted(got, key=operator.attrgetter('id'))
|
||||
want = sorted(want, key=operator.itemgetter('id'))
|
||||
got = sorted(got, key=operator.attrgetter('id', 'permission'))
|
||||
want = sorted(want, key=operator.itemgetter('id', 'permission'))
|
||||
for g, w in zip(got, want):
|
||||
w = dict(w)
|
||||
eq(g.permission, w.pop('permission'))
|
||||
|
|
Loading…
Reference in a new issue