@mock_ec2
def test_create_dhcp_options_invalid_options():
 conn = boto.connect_vpc(u'the_key', u'the_secret')
 servers = [u'f', u'f', u'f', u'f', u'f']
 with assert_raises(EC2ResponseError) as cm:
  conn.create_dhcp_options(ntp_servers=servers)
 cm.exception.code.should.equal(u'InvalidParameterValue')
 cm.exception.status.should.equal(400)
 cm.exception.request_id.should_not.be.none
 with assert_raises(EC2ResponseError) as cm:
  conn.create_dhcp_options(netbios_node_type=u'0')
 cm.exception.code.should.equal(u'InvalidParameterValue')
 cm.exception.status.should.equal(400)
 cm.exception.request_id.should_not.be.none

@ mock_ec2 def test_create_dhcp_options_invalid_options ( ) : conn = boto . connect_vpc ( u'the_key' , u'the_secret' ) servers = [ u'f' , u'f' , u'f' , u'f' , u'f' ] with assert_raises ( EC2ResponseError ) as cm : conn . create_dhcp_options ( ntp_servers = servers ) cm . exception . code . should . equal ( u'InvalidParameterValue' ) cm . exception . status . should . equal ( 400 ) cm . exception . request_id . should_not . be . none with assert_raises ( EC2ResponseError ) as cm : conn . create_dhcp_options ( netbios_node_type = u'0' ) cm . exception . code . should . equal ( u'InvalidParameterValue' ) cm . exception . status . should . equal ( 400 ) cm . exception . request_id . should_not . be . none
create invalid dhcp options .