Linting
This commit is contained in:
parent
81ca5c3ab0
commit
aae49493c4
@ -937,7 +937,7 @@ class InstanceBackend(object):
|
||||
value = getattr(instance, key)
|
||||
return instance, value
|
||||
|
||||
def describe_instance_credit_specifications(self,instance_ids):
|
||||
def describe_instance_credit_specifications(self, instance_ids):
|
||||
queried_instances = []
|
||||
for instance in self.get_multi_instances_by_id(instance_ids):
|
||||
queried_instances.append(instance)
|
||||
|
@ -170,7 +170,9 @@ class InstanceResponse(BaseResponse):
|
||||
|
||||
def describe_instance_credit_specifications(self):
|
||||
instance_ids = self._get_multi_param("InstanceId")
|
||||
instance = self.ec2_backend.describe_instance_credit_specifications(instance_ids)
|
||||
instance = self.ec2_backend.describe_instance_credit_specifications(
|
||||
instance_ids
|
||||
)
|
||||
template = self.response_template(EC2_DESCRIBE_INSTANCE_CREDIT_SPECIFICATIONS)
|
||||
return template.render(instances=instance)
|
||||
|
||||
|
@ -1165,14 +1165,21 @@ def test_describe_instance_status_with_instance_filter_deprecated():
|
||||
cm.exception.status.should.equal(400)
|
||||
cm.exception.request_id.should_not.be.none
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_describe_instance_credit_specifications():
|
||||
conn = boto3.client("ec2", region_name="us-west-1")
|
||||
|
||||
# We want to filter based on this one
|
||||
reservation = conn.run_instances(ImageId="ami-1234abcd", MinCount=1, MaxCount=1)
|
||||
result = conn.describe_instance_credit_specifications(InstanceIds=[reservation["Instances"][0]["InstanceId"]])
|
||||
assert result['InstanceCreditSpecifications'][0]['InstanceId'] == reservation["Instances"][0]["InstanceId"]
|
||||
result = conn.describe_instance_credit_specifications(
|
||||
InstanceIds=[reservation["Instances"][0]["InstanceId"]]
|
||||
)
|
||||
assert (
|
||||
result["InstanceCreditSpecifications"][0]["InstanceId"]
|
||||
== reservation["Instances"][0]["InstanceId"]
|
||||
)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_describe_instance_status_with_instance_filter():
|
||||
|
Loading…
Reference in New Issue
Block a user