@mock_ec2
def test_dhcp_options_associate_invalid_vpc_id():
 conn = boto.connect_vpc(u'the_key', u'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, u'foo')
 cm.exception.code.should.equal(u'InvalidVpcID.NotFound')
 cm.exception.status.should.equal(400)
 cm.exception.request_id.should_not.be.none

@ mock_ec2 def test_dhcp_options_associate_invalid_vpc_id ( ) : conn = boto . connect_vpc ( u'the_key' , u'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 , u'foo' ) cm . exception . code . should . equal ( u'InvalidVpcID.NotFound' ) cm . exception . status . should . equal ( 400 ) cm . exception . request_id . should_not . be . none
associate dhcp option invalid vpc id .