#NEWLINE# def test_create_subnet_with_multiple_enable_dhcp( self ) : #NEWLINE# #INDENT# resource = 'subnet' #NEWLINE# cmd = subnet . CreateSubnet ( test_cli20 . MyApp ( sys . stdout ) , None ) #NEWLINE# name = 'myname' #NEWLINE# myid = 'myid' #NEWLINE# netid = 'netid' #NEWLINE# cidr = 'cidrvalue' #NEWLINE# position_names = [ 'ip_version' , 'network_id' , 'cidr' , 'enable_dhcp' ] #NEWLINE# position_values = [ 4 , netid , cidr ] #NEWLINE# _ = 'UNUSED_MARKER' #NEWLINE# for ( tested_args , should_fail , pos_value ) in ( ( [ '--enable-dhcp' , '--enable-dhcp=True' ] , False , True ) , ( [ '--enable-dhcp' , '--enable-dhcp=False' ] , True , _ ) , ( [ '--enable-dhcp=False' , '--enable-dhcp' ] , True , _ ) , ( [ '--enable-dhcp=True' , '--enable-dhcp=False' ] , True , _ ) , ( [ '--enable-dhcp=False' , '--enable-dhcp=True' ] , True , _ ) ) : #NEWLINE# #INDENT# args = ( should_fail + [ netid , cidr ] ) #NEWLINE# pos_values = ( position_values + [ pos_value ] ) #NEWLINE# self . _test_create_resource_and_catch_command_error ( should_fail , resource , cmd , name , myid , args , position_names , pos_values )