diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index b839b4e..da147cb 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -8754,8 +8754,11 @@ def make_json_policy(action, resource, principal={"AWS": "*"}, conditions=None): }] } - if conditions is not None: - policy["Statement"]["Condition"] = conditions + # Currently lets only support adding a common conditional to every + # statement in this function + for statement in policy["Statement"]: + if conditions is not None: + statement["Condition"] = conditions return json.dumps(policy)