@mock_ec2
def test_delete_dhcp_options():
 conn = boto.connect_vpc(u'the_key', u'the_secret')
 dhcp_option = conn.create_dhcp_options()
 dhcp_options = conn.get_all_dhcp_options([dhcp_option.id])
 dhcp_options.should.be.length_of(1)
 conn.delete_dhcp_options(dhcp_option.id)
 with assert_raises(EC2ResponseError) as cm:
  conn.get_all_dhcp_options([dhcp_option.id])
 cm.exception.code.should.equal(u'InvalidDhcpOptionID.NotFound')
 cm.exception.status.should.equal(400)
 cm.exception.request_id.should_not.be.none

@ mock_ec2 def test_delete_dhcp_options ( ) : conn = boto . connect_vpc ( u'the_key' , u'the_secret' ) dhcp_option = conn . create_dhcp_options ( ) dhcp_options = conn . get_all_dhcp_options ( [ dhcp_option . id ] ) dhcp_options . should . be . length_of ( 1 ) conn . delete_dhcp_options ( dhcp_option . id ) with assert_raises ( EC2ResponseError ) as cm : conn . get_all_dhcp_options ( [ dhcp_option . id ] ) cm . exception . code . should . equal ( u'InvalidDhcpOptionID.NotFound' ) cm . exception . status . should . equal ( 400 ) cm . exception . request_id . should_not . be . none
delete dhcp option .