Get standalone server mode working for all tests.

This commit is contained in:
Steve Pulec 2017-02-23 19:43:48 -05:00
commit 81836b6981
78 changed files with 957 additions and 783 deletions

View file

@ -1,6 +1,5 @@
from __future__ import unicode_literals
from boto.ec2.instancetype import InstanceType
from boto.exception import JSONResponseError
from moto.core.responses import BaseResponse
from moto.core.utils import camelcase_to_underscores
from moto.ec2.utils import instance_ids_from_querystring, filters_from_querystring, \

View file

@ -1,6 +1,5 @@
from __future__ import unicode_literals
from boto.exception import JSONResponseError
from moto.core.responses import BaseResponse

View file

@ -35,8 +35,8 @@ class SpotInstances(BaseResponse):
def request_spot_instances(self):
price = self._get_param('SpotPrice')
image_id = self._get_param('LaunchSpecification.ImageId')
count = self._get_int_param('InstanceCount')
type = self._get_param('Type')
count = self._get_int_param('InstanceCount', 1)
type = self._get_param('Type', 'one-time')
valid_from = self._get_param('ValidFrom')
valid_until = self._get_param('ValidUntil')
launch_group = self._get_param('LaunchGroup')
@ -44,7 +44,7 @@ class SpotInstances(BaseResponse):
key_name = self._get_param('LaunchSpecification.KeyName')
security_groups = self._get_multi_param('LaunchSpecification.SecurityGroup')
user_data = self._get_param('LaunchSpecification.UserData')
instance_type = self._get_param('LaunchSpecification.InstanceType')
instance_type = self._get_param('LaunchSpecification.InstanceType', 'm1.small')
placement = self._get_param('LaunchSpecification.Placement.AvailabilityZone')
kernel_id = self._get_param('LaunchSpecification.KernelId')
ramdisk_id = self._get_param('LaunchSpecification.RamdiskId')