Cleanup some tests to work across regions. cc #232
This commit is contained in:
parent
bd847bd941
commit
2a61ef6f91
4 changed files with 34 additions and 28 deletions
|
|
@ -190,7 +190,7 @@ def test_modify_attribute_blockDeviceMapping():
|
|||
|
||||
[0] https://github.com/spulec/moto/issues/160
|
||||
"""
|
||||
conn = boto.connect_ec2('the_key', 'the_secret')
|
||||
conn = boto.ec2.connect_to_region("us-east-1")
|
||||
|
||||
reservation = conn.run_instances('ami-1234abcd')
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import tests.backport_assert_raises
|
|||
from nose.tools import assert_raises
|
||||
|
||||
import boto
|
||||
import boto.cloudformation
|
||||
import boto.ec2
|
||||
from boto.exception import EC2ResponseError
|
||||
import sure # noqa
|
||||
|
||||
|
|
@ -151,12 +153,12 @@ def test_elastic_network_interfaces_filtering():
|
|||
def test_elastic_network_interfaces_cloudformation():
|
||||
template = vpc_eni.template
|
||||
template_json = json.dumps(template)
|
||||
conn = boto.connect_cloudformation()
|
||||
conn = boto.cloudformation.connect_to_region("us-west-1")
|
||||
conn.create_stack(
|
||||
"test_stack",
|
||||
template_body=template_json,
|
||||
)
|
||||
ec2_conn = boto.connect_ec2()
|
||||
ec2_conn = boto.ec2.connect_to_region("us-west-1")
|
||||
eni = ec2_conn.get_all_network_interfaces()[0]
|
||||
|
||||
stack = conn.describe_stacks()[0]
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ def test_request_spot_instances_fulfilled():
|
|||
"""
|
||||
Test that moto correctly fullfills a spot instance request
|
||||
"""
|
||||
conn = boto.connect_ec2()
|
||||
conn = boto.ec2.connect_to_region("us-east-1")
|
||||
|
||||
request = conn.request_spot_instances(
|
||||
price=0.5, image_id='ami-abcd1234',
|
||||
|
|
@ -184,7 +184,7 @@ def test_get_all_spot_instance_requests_filtering():
|
|||
|
||||
@mock_ec2
|
||||
def test_request_spot_instances_setting_instance_id():
|
||||
conn = boto.connect_ec2()
|
||||
conn = boto.ec2.connect_to_region("us-east-1")
|
||||
request = conn.request_spot_instances(
|
||||
price=0.5, image_id='ami-abcd1234')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue