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