PR changes

This commit is contained in:
Bert Blommers 2019-10-18 09:18:12 +01:00 committed by GitHub
parent 856a06a778
commit deffefbfb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -343,7 +343,6 @@ def test_delete_policy():
conn = boto3.client('iam', region_name='us-east-1')
response = conn.create_policy(PolicyName="TestCreatePolicy", PolicyDocument=MOCK_POLICY)
[pol['PolicyName'] for pol in conn.list_policies(Scope='Local')['Policies']].should.equal(['TestCreatePolicy'])
#
conn.delete_policy(PolicyArn=response['Policy']['Arn'])
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')
with assert_raises(ClientError):
conn.delete_user(UserName='my-user')
#
conn.create_user(UserName='my-user')
[user['UserName'] for user in conn.list_users()['Users']].should.equal(['my-user'])
#
conn.delete_user(UserName='my-user')
assert conn.list_users()['Users'].should.be.empty