Add roles to the list instance profiles response
This commit is contained in:
parent
ac4ce7d53f
commit
71358603ac
2 changed files with 27 additions and 2 deletions
|
|
@ -66,7 +66,21 @@ def test_create_role_and_instance_profile():
|
|||
role_from_profile['role_name'].should.equal("my-role")
|
||||
|
||||
conn.list_roles().roles[0].role_name.should.equal('my-role')
|
||||
conn.list_instance_profiles().instance_profiles[0].instance_profile_name.should.equal("my-profile")
|
||||
|
||||
|
||||
@mock_iam()
|
||||
def test_list_instance_profiles():
|
||||
conn = boto.connect_iam()
|
||||
conn.create_instance_profile("my-profile", path="my-path")
|
||||
conn.create_role("my-role", path="my-path")
|
||||
|
||||
conn.add_role_to_instance_profile("my-profile", "my-role")
|
||||
|
||||
profiles = conn.list_instance_profiles().instance_profiles
|
||||
|
||||
len(profiles).should.equal(1)
|
||||
profiles[0].instance_profile_name.should.equal("my-profile")
|
||||
profiles[0].roles.role_name.should.equal("my-role")
|
||||
|
||||
|
||||
@mock_iam()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue