From 26adb84b304f540d80d235ed419f4416e01caf5f Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Thu, 19 Oct 2017 16:25:42 +0200 Subject: [PATCH] move ListBucket to new policy class --- s3tests/functional/test_s3.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index 1b32535..4165f99 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -8970,14 +8970,14 @@ def test_bucket_policy_set_condition_operator_end_with_IfExists(): @attr('bucket-policy') def test_bucket_policy_list_bucket_with_prefix(): bucket = _create_keys(keys=['foo','folder/foo1','folder/foo2','folder/foo3','foo2']) - tag_conditional = {"StringEquals": { + conditional = {"StringEquals": { "s3:prefix" : "folder" }} resource = _make_arn_resource(bucket.name) - policy_document = make_json_policy("s3:ListBucket", - resource, - conditions=tag_conditional) + p = Policy() + s = Statement("s3:ListBucket", resource, condition=conditional) + policy_document = p.add_statement(s).to_json() eq(bucket.set_policy(policy_document), True)