

@mock_ec2
def test_vpcs():
    conn = boto.connect_vpc('the_key', 'the_secret')
    vpc = conn.create_vpc('10.0.0.0/16')
    vpc.cidr_block.should.equal('10.0.0.0/16')
    all_vpcs = vpc.get_all_vpcs()
    all_vpcs.should.have.length_of(1)
    vpc.delete()
    all_vpcs = conn.get_all_vpcs()
    all_vpcs.should.have.length_of(0)
    with assert_raises(EC2ResponseError) as cm:
        conn.delete_vpc('vpc-1234abcd')
    cm.exception.code.should.equal('InvalidVpcID.NotFound')
    cm.exception.status.should.equal(400)
    cm.exception.request_id.should_not.be.none

dataset/ETHPy150Open spulec/moto/tests/test_ec2/test_vpcs.py test_vpcs/VarMisuse@45/84 `conn`->`vpc`