@@ -285,8 +285,16 @@ def test_ensure_default_build_image_stack_cleanup_role_permission_denied(self, a
285285 @pytest .mark .parametrize (
286286 "account_id, partition, actions" ,
287287 [
288- ("123456789012" , "aws" , ["lambda:DeleteFunction" , "lambda:RemovePermission" , "lambda:GetFunction" , "lambda:GetPolicy" ]),
289- ("000000000000" , "aws-us-gov" , ["lambda:DeleteFunction" , "lambda:RemovePermission" , "lambda:GetFunction" , "lambda:GetPolicy" ]),
288+ (
289+ "123456789012" ,
290+ "aws" ,
291+ ["lambda:DeleteFunction" , "lambda:RemovePermission" , "lambda:GetFunction" , "lambda:GetPolicy" ],
292+ ),
293+ (
294+ "000000000000" ,
295+ "aws-us-gov" ,
296+ ["lambda:DeleteFunction" , "lambda:RemovePermission" , "lambda:GetFunction" , "lambda:GetPolicy" ],
297+ ),
290298 ],
291299 )
292300 def test_expected_inline_policy_dynamic_fields (self , account_id , partition , actions ):
@@ -310,7 +318,7 @@ def test_expected_inline_policy_dynamic_fields(self, account_id, partition, acti
310318 if not res == f"arn:{ partition } :ec2:*::image/*" :
311319 assert f":{ account_id } :" in res
312320 if len (actions ) != 0 :
313- assert False , f"Actions { actions } are not in the policy"
321+ raise AssertionError ( f"Actions { actions } are not in the policy" )
314322
315323 def _build_args (self , args ):
316324 args = [[k , v ] if v is not None else [k ] for k , v in args .items ()]
0 commit comments