IAM: get_role should thrown when role is unexisting
This commit is contained in:
parent
20306c9b24
commit
db7d7a9330
2 changed files with 8 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ from nose.tools import assert_raises, assert_equals, assert_not_equals
|
|||
from boto.exception import BotoServerError
|
||||
import base64
|
||||
from moto import mock_iam
|
||||
from nose.tools import raises
|
||||
|
||||
|
||||
@mock_iam()
|
||||
|
|
@ -39,6 +40,12 @@ def test_upload_server_cert():
|
|||
cert.server_certificate_name.should.equal("certname")
|
||||
cert.arn.should.equal("arn:aws:iam::123456789012:server-certificate/certname")
|
||||
|
||||
@mock_iam()
|
||||
@raises(BotoServerError)
|
||||
def test_get_role__should_throw__when_role_does_not_exist():
|
||||
conn = boto.connect_iam()
|
||||
|
||||
conn.get_role('unexisting_role')
|
||||
|
||||
@mock_iam()
|
||||
def test_create_role_and_instance_profile():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue