Testing new version of decorator.
This commit is contained in:
parent
d3df810065
commit
fde721bed7
123 changed files with 2740 additions and 1114 deletions
|
|
@ -8,13 +8,13 @@ import boto
|
|||
from boto.exception import EC2ResponseError
|
||||
import sure # noqa
|
||||
|
||||
from moto import mock_ec2
|
||||
from moto import mock_ec2, mock_ec2_deprecated
|
||||
|
||||
SAMPLE_DOMAIN_NAME = u'example.com'
|
||||
SAMPLE_NAME_SERVERS = [u'10.0.0.6', u'10.0.0.7']
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpcs():
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
vpc = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -35,7 +35,7 @@ def test_vpcs():
|
|||
cm.exception.request_id.should_not.be.none
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_defaults():
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
vpc = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -50,7 +50,7 @@ def test_vpc_defaults():
|
|||
conn.get_all_route_tables().should.have.length_of(1)
|
||||
conn.get_all_security_groups(filters={'vpc-id': [vpc.id]}).should.have.length_of(0)
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_isdefault_filter():
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
vpc = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -59,7 +59,7 @@ def test_vpc_isdefault_filter():
|
|||
conn.get_all_vpcs(filters={'isDefault': 'true'}).should.have.length_of(1)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_multiple_vpcs_default_filter():
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
conn.create_vpc("10.8.0.0/16")
|
||||
|
|
@ -71,7 +71,7 @@ def test_multiple_vpcs_default_filter():
|
|||
vpc[0].cidr_block.should.equal('172.31.0.0/16')
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_state_available_filter():
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
vpc = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -80,7 +80,7 @@ def test_vpc_state_available_filter():
|
|||
vpc.delete()
|
||||
conn.get_all_vpcs(filters={'state': 'available'}).should.have.length_of(2)
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_tagging():
|
||||
conn = boto.connect_vpc()
|
||||
vpc = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -96,7 +96,7 @@ def test_vpc_tagging():
|
|||
vpc.tags["a key"].should.equal("some value")
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_get_by_id():
|
||||
conn = boto.connect_vpc()
|
||||
vpc1 = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -110,7 +110,7 @@ def test_vpc_get_by_id():
|
|||
vpc2.id.should.be.within(vpc_ids)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_get_by_cidr_block():
|
||||
conn = boto.connect_vpc()
|
||||
vpc1 = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -124,7 +124,7 @@ def test_vpc_get_by_cidr_block():
|
|||
vpc2.id.should.be.within(vpc_ids)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_get_by_dhcp_options_id():
|
||||
conn = boto.connect_vpc()
|
||||
dhcp_options = conn.create_dhcp_options(SAMPLE_DOMAIN_NAME, SAMPLE_NAME_SERVERS)
|
||||
|
|
@ -142,7 +142,7 @@ def test_vpc_get_by_dhcp_options_id():
|
|||
vpc2.id.should.be.within(vpc_ids)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_get_by_tag():
|
||||
conn = boto.connect_vpc()
|
||||
vpc1 = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -160,7 +160,7 @@ def test_vpc_get_by_tag():
|
|||
vpc2.id.should.be.within(vpc_ids)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_get_by_tag_key_superset():
|
||||
conn = boto.connect_vpc()
|
||||
vpc1 = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -180,7 +180,7 @@ def test_vpc_get_by_tag_key_superset():
|
|||
vpc2.id.should.be.within(vpc_ids)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_get_by_tag_key_subset():
|
||||
conn = boto.connect_vpc()
|
||||
vpc1 = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -200,7 +200,7 @@ def test_vpc_get_by_tag_key_subset():
|
|||
vpc2.id.should.be.within(vpc_ids)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_get_by_tag_value_superset():
|
||||
conn = boto.connect_vpc()
|
||||
vpc1 = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -220,7 +220,7 @@ def test_vpc_get_by_tag_value_superset():
|
|||
vpc2.id.should.be.within(vpc_ids)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_get_by_tag_value_subset():
|
||||
conn = boto.connect_vpc()
|
||||
vpc1 = conn.create_vpc("10.0.0.0/16")
|
||||
|
|
@ -339,7 +339,7 @@ def test_vpc_modify_enable_dns_hostnames():
|
|||
attr = response.get('EnableDnsHostnames')
|
||||
attr.get('Value').should.be.ok
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_vpc_associate_dhcp_options():
|
||||
conn = boto.connect_vpc()
|
||||
dhcp_options = conn.create_dhcp_options(SAMPLE_DOMAIN_NAME, SAMPLE_NAME_SERVERS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue