def test_iam_role_policy(resource_action, get_template, get_properties, get_details, construct_policy, session,
attach_profile_to_role):
"""IAM Role Policy should match deployment type."""
get_properties.return_value = {'type': 'ec2'}
get_details.return_value.iam.return_value = {'group': 1, 'policy': 2, 'profile': 3, 'role': 4, 'user': 5}
assert create_iam_resources()
get_template.assert_called_with(EC2_TEMPLATE_NAME)
calls = [
mock.call(
mock.ANY,
action='create_role',
log_format=mock.ANY,
RoleName=mock.ANY,
AssumeRolePolicyDocument=get_template.return_value)
]
resource_action.assert_has_calls(calls)
评论列表
文章目录