PR changes
This commit is contained in:
parent
856a06a778
commit
deffefbfb8
@ -343,7 +343,6 @@ def test_delete_policy():
|
|||||||
conn = boto3.client('iam', region_name='us-east-1')
|
conn = boto3.client('iam', region_name='us-east-1')
|
||||||
response = conn.create_policy(PolicyName="TestCreatePolicy", PolicyDocument=MOCK_POLICY)
|
response = conn.create_policy(PolicyName="TestCreatePolicy", PolicyDocument=MOCK_POLICY)
|
||||||
[pol['PolicyName'] for pol in conn.list_policies(Scope='Local')['Policies']].should.equal(['TestCreatePolicy'])
|
[pol['PolicyName'] for pol in conn.list_policies(Scope='Local')['Policies']].should.equal(['TestCreatePolicy'])
|
||||||
#
|
|
||||||
conn.delete_policy(PolicyArn=response['Policy']['Arn'])
|
conn.delete_policy(PolicyArn=response['Policy']['Arn'])
|
||||||
assert conn.list_policies(Scope='Local')['Policies'].should.be.empty
|
assert conn.list_policies(Scope='Local')['Policies'].should.be.empty
|
||||||
|
|
||||||
@ -736,10 +735,8 @@ def test_delete_user():
|
|||||||
conn = boto3.client('iam', region_name='us-east-1')
|
conn = boto3.client('iam', region_name='us-east-1')
|
||||||
with assert_raises(ClientError):
|
with assert_raises(ClientError):
|
||||||
conn.delete_user(UserName='my-user')
|
conn.delete_user(UserName='my-user')
|
||||||
#
|
|
||||||
conn.create_user(UserName='my-user')
|
conn.create_user(UserName='my-user')
|
||||||
[user['UserName'] for user in conn.list_users()['Users']].should.equal(['my-user'])
|
[user['UserName'] for user in conn.list_users()['Users']].should.equal(['my-user'])
|
||||||
#
|
|
||||||
conn.delete_user(UserName='my-user')
|
conn.delete_user(UserName='my-user')
|
||||||
assert conn.list_users()['Users'].should.be.empty
|
assert conn.list_users()['Users'].should.be.empty
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user