Testing new version of decorator.
This commit is contained in:
parent
d3df810065
commit
fde721bed7
123 changed files with 2740 additions and 1114 deletions
|
|
@ -10,14 +10,14 @@ from boto.exception import EC2ResponseError, JSONResponseError
|
|||
|
||||
import sure # noqa
|
||||
|
||||
from moto import mock_ec2
|
||||
from moto import mock_ec2_deprecated
|
||||
|
||||
|
||||
VPC_CIDR="10.0.0.0/16"
|
||||
BAD_VPC="vpc-deadbeef"
|
||||
BAD_IGW="igw-deadbeef"
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_create():
|
||||
""" internet gateway create """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -37,7 +37,7 @@ def test_igw_create():
|
|||
igw = conn.get_all_internet_gateways()[0]
|
||||
igw.attachments.should.have.length_of(0)
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_attach():
|
||||
""" internet gateway attach """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -55,7 +55,7 @@ def test_igw_attach():
|
|||
igw = conn.get_all_internet_gateways()[0]
|
||||
igw.attachments[0].vpc_id.should.be.equal(vpc.id)
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_attach_bad_vpc():
|
||||
""" internet gateway fail to attach w/ bad vpc """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -67,7 +67,7 @@ def test_igw_attach_bad_vpc():
|
|||
cm.exception.status.should.equal(400)
|
||||
cm.exception.request_id.should_not.be.none
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_attach_twice():
|
||||
""" internet gateway fail to attach twice """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -82,7 +82,7 @@ def test_igw_attach_twice():
|
|||
cm.exception.status.should.equal(400)
|
||||
cm.exception.request_id.should_not.be.none
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_detach():
|
||||
""" internet gateway detach"""
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -100,7 +100,7 @@ def test_igw_detach():
|
|||
igw = conn.get_all_internet_gateways()[0]
|
||||
igw.attachments.should.have.length_of(0)
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_detach_wrong_vpc():
|
||||
""" internet gateway fail to detach w/ wrong vpc """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -115,7 +115,7 @@ def test_igw_detach_wrong_vpc():
|
|||
cm.exception.status.should.equal(400)
|
||||
cm.exception.request_id.should_not.be.none
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_detach_invalid_vpc():
|
||||
""" internet gateway fail to detach w/ invalid vpc """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -129,7 +129,7 @@ def test_igw_detach_invalid_vpc():
|
|||
cm.exception.status.should.equal(400)
|
||||
cm.exception.request_id.should_not.be.none
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_detach_unattached():
|
||||
""" internet gateway fail to detach unattached """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -142,7 +142,7 @@ def test_igw_detach_unattached():
|
|||
cm.exception.status.should.equal(400)
|
||||
cm.exception.request_id.should_not.be.none
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_delete():
|
||||
""" internet gateway delete"""
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -160,7 +160,7 @@ def test_igw_delete():
|
|||
conn.delete_internet_gateway(igw.id)
|
||||
conn.get_all_internet_gateways().should.have.length_of(0)
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_delete_attached():
|
||||
""" internet gateway fail to delete attached """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -174,7 +174,7 @@ def test_igw_delete_attached():
|
|||
cm.exception.status.should.equal(400)
|
||||
cm.exception.request_id.should_not.be.none
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_desribe():
|
||||
""" internet gateway fetch by id """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -182,7 +182,7 @@ def test_igw_desribe():
|
|||
igw_by_search = conn.get_all_internet_gateways([igw.id])[0]
|
||||
igw.id.should.equal(igw_by_search.id)
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_desribe_bad_id():
|
||||
""" internet gateway fail to fetch by bad id """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -193,7 +193,7 @@ def test_igw_desribe_bad_id():
|
|||
cm.exception.request_id.should_not.be.none
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_filter_by_vpc_id():
|
||||
""" internet gateway filter by vpc id """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -208,7 +208,7 @@ def test_igw_filter_by_vpc_id():
|
|||
result[0].id.should.equal(igw1.id)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_filter_by_tags():
|
||||
""" internet gateway filter by vpc id """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -222,7 +222,7 @@ def test_igw_filter_by_tags():
|
|||
result[0].id.should.equal(igw1.id)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_filter_by_internet_gateway_id():
|
||||
""" internet gateway filter by internet gateway id """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
@ -235,7 +235,7 @@ def test_igw_filter_by_internet_gateway_id():
|
|||
result[0].id.should.equal(igw1.id)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ec2_deprecated
|
||||
def test_igw_filter_by_attachment_state():
|
||||
""" internet gateway filter by attachment state """
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue