#NEWLINE# def test_qos_create_with_properties( self ) : #NEWLINE# #INDENT# self . qos_mock . create . return_value = fakes . FakeResource ( None , copy . deepcopy ( volume_fakes . QOS_WITH_SPECS ) , loaded = True ) #NEWLINE# arglist = [ volume_fakes . qos_name , '--consumer' , volume_fakes . qos_consumer , '--property' , 'foo=bar' , '--property' , 'iops=9001' ] #NEWLINE# verifylist = [ ( 'name' , volume_fakes . qos_name ) , ( 'consumer' , volume_fakes . qos_consumer ) , ( 'property' , volume_fakes . qos_specs ) ] #NEWLINE# parsed_args = self . check_parser ( self . cmd , arglist , verifylist ) #NEWLINE# ( columns , data ) = self . cmd . take_action ( parsed_args ) #NEWLINE# specs = volume_fakes . qos_specs . copy ( ) #NEWLINE# specs . update ( { #NEWLINE# #INDENT# 'consumer' : volume_fakes . qos_consumer , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . qos_mock . create . assert_called_with ( volume_fakes . qos_name , specs ) #NEWLINE# columns = ( datalist . columns + ( 'specs' , ) ) #NEWLINE# self . assertEqual ( columns , columns ) #NEWLINE# datalist = ( self . datalist + ( volume_fakes . qos_specs , ) ) #NEWLINE# self . assertEqual ( datalist , data )