CreateSubnet: Added VPC ID validation.

This commit is contained in:
Shawn Falkner-Horine 2014-08-26 14:04:34 -07:00
commit 0ecae450a1
4 changed files with 12 additions and 0 deletions

Binary file not shown.

View file

@ -30,6 +30,17 @@ def test_subnets():
cm.exception.request_id.should_not.be.none
@mock_ec2
def test_subnet_create_vpc_validation():
conn = boto.connect_vpc('the_key', 'the_secret')
with assert_raises(EC2ResponseError) as cm:
conn.create_subnet("vpc-abcd1234", "10.0.0.0/18")
cm.exception.code.should.equal('InvalidVpcID.NotFound')
cm.exception.status.should.equal(400)
cm.exception.request_id.should_not.be.none
@mock_ec2
def test_subnet_tagging():
conn = boto.connect_vpc('the_key', 'the_secret')