Fix formatting
This commit is contained in:
parent
593e5dc86a
commit
965046aa39
2 changed files with 8 additions and 2 deletions
|
|
@ -659,7 +659,11 @@ class AutoScalingBackend(BaseBackend):
|
||||||
instance_states = []
|
instance_states = []
|
||||||
for group in self.autoscaling_groups.values():
|
for group in self.autoscaling_groups.values():
|
||||||
instance_states.extend(
|
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
|
return instance_states
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -874,7 +874,9 @@ def test_describe_autoscaling_instances_instanceid_filter():
|
||||||
for instance in response["AutoScalingGroups"][0]["Instances"]
|
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)
|
len(response["AutoScalingInstances"]).should.equal(2)
|
||||||
for instance in response["AutoScalingInstances"]:
|
for instance in response["AutoScalingInstances"]:
|
||||||
instance["AutoScalingGroupName"].should.equal("test_asg")
|
instance["AutoScalingGroupName"].should.equal("test_asg")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue