From dd898add4dcce9d0e8db3fce131cffa8d2d03777 Mon Sep 17 00:00:00 2001 From: Chris Opland Date: Sun, 21 Apr 2019 18:23:00 -0500 Subject: [PATCH] Add test verifying create_role path defaults to / --- tests/test_iam/test_iam.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_iam/test_iam.py b/tests/test_iam/test_iam.py index 3240e0f13..1cd6f9e62 100644 --- a/tests/test_iam/test_iam.py +++ b/tests/test_iam/test_iam.py @@ -1287,4 +1287,9 @@ def test_list_entities_for_policy(): assert response['PolicyRoles'] == [{'RoleName': 'my-role'}] +@mock_iam() +def test_create_role_no_path(): + conn = boto3.client('iam', region_name='us-east-1') + resp = conn.create_role(RoleName='my-role', AssumeRolePolicyDocument='some policy', Description='test') + resp.get('Role').get('Arn').should.equal('arn:aws:iam::123456789012:role/my-role')