Fix formatting

This commit is contained in:
DenverJ 2020-04-12 17:08:40 +10:00
parent 593e5dc86a
commit 965046aa39
2 changed files with 8 additions and 2 deletions

View File

@ -659,7 +659,11 @@ class AutoScalingBackend(BaseBackend):
instance_states = []
for group in self.autoscaling_groups.values():
instance_states.extend(
[x for x in group.instance_states if not instance_ids or x.instance.id in instance_ids]
[
x
for x in group.instance_states
if not instance_ids or x.instance.id in instance_ids
]
)
return instance_states

View File

@ -874,7 +874,9 @@ def test_describe_autoscaling_instances_instanceid_filter():
for instance in response["AutoScalingGroups"][0]["Instances"]
]
response = client.describe_auto_scaling_instances(InstanceIds=instance_ids[0:2]) # Filter by first 2 of 5
response = client.describe_auto_scaling_instances(
InstanceIds=instance_ids[0:2]
) # Filter by first 2 of 5
len(response["AutoScalingInstances"]).should.equal(2)
for instance in response["AutoScalingInstances"]:
instance["AutoScalingGroupName"].should.equal("test_asg")