mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 13:47:27 +00:00
Care less about ordering when checking grants
Some tests, like test_object_header_acl_grants and
test_bucket_header_acl_grants, use the same id for all permissions.
Sort() is stable, so those tests end up testing the order of acl grants
returned by Boto. Not sure, but I think this may in turn depend on the
order of HTTP headers, where the order is not significant.
Signed-off-by: Tim Burke <tim.burke@gmail.com>
(cherry picked from commit 301272c0ef
)
This commit is contained in:
parent
a271ebeaa1
commit
b1c1d2d98b
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