Linting
This commit is contained in:
parent
20364b177a
commit
9163f04292
@ -331,7 +331,9 @@ class Role(BaseModel):
|
||||
cls, resource_name, cloudformation_json, region_name
|
||||
):
|
||||
properties = cloudformation_json["Properties"]
|
||||
role_name = properties['RoleName'] if 'RoleName' in properties else str(uuid4())[0:5]
|
||||
role_name = (
|
||||
properties["RoleName"] if "RoleName" in properties else str(uuid4())[0:5]
|
||||
)
|
||||
|
||||
role = iam_backend.create_role(
|
||||
role_name=role_name,
|
||||
|
@ -918,7 +918,7 @@ def test_iam_roles():
|
||||
"Principal": {"Service": ["ec2.amazonaws.com"]},
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
},
|
||||
"Type": "AWS::IAM::Role",
|
||||
},
|
||||
@ -940,7 +940,9 @@ def test_iam_roles():
|
||||
if "my-role" not in role.role_name:
|
||||
role_name_to_id["with-path"] = role.role_id
|
||||
role.path.should.equal("my-path")
|
||||
len(role.role_name).should.equal(5) # Role name is not specified, so randomly generated - can't check exact name
|
||||
len(role.role_name).should.equal(
|
||||
5
|
||||
) # Role name is not specified, so randomly generated - can't check exact name
|
||||
else:
|
||||
role_name_to_id["no-path"] = role.role_id
|
||||
role.role_name.should.equal("my-role-no-path-name")
|
||||
|
Loading…
Reference in New Issue
Block a user