@mock_ec2
def test_dhcp_options_associate_invalid_vpc_id():
    conn = boto.connect_vpc('the_key', 'the_secret')
    dhcp_options = conn.create_dhcp_options(SAMPLE_DOMAIN_NAME, SAMPLE_NAME_SERVERS)

    with assert_raises(EC2ResponseError) as cm:
        conn.associate_dhcp_options(dhcp_options.id, "foo")
    cm.exception.code.should.equal('InvalidVpcID.NotFound')
    cm.exception.status.should.equal(400)
    cm.exception.request_id.should_not.be.none
associate dhcp option invalid vpc id
dataset/ETHPy150Open spulec/moto/tests/test_ec2/test_dhcp_options.py/test_dhcp_options_associate_invalid_vpc_id