mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 03:47:22 +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.
|
in any order.
|
||||||
"""
|
"""
|
||||||
eq(len(got), len(want))
|
eq(len(got), len(want))
|
||||||
got = sorted(got, key=operator.attrgetter('id'))
|
got = sorted(got, key=operator.attrgetter('id', 'permission'))
|
||||||
want = sorted(want, key=operator.itemgetter('id'))
|
want = sorted(want, key=operator.itemgetter('id', 'permission'))
|
||||||
for g, w in zip(got, want):
|
for g, w in zip(got, want):
|
||||||
w = dict(w)
|
w = dict(w)
|
||||||
eq(g.permission, w.pop('permission'))
|
eq(g.permission, w.pop('permission'))
|
||||||
|
|
Loading…
Reference in a new issue