#NEWLINE# def test_user_create_password_prompt( self ) : #NEWLINE# #INDENT# arglist = [ '--password-prompt' , identity_fakes . user_name ] #NEWLINE# verifylist = [ ( 'password' , None ) , ( 'password_prompt' , True ) , ( 'enable' , False ) , ( 'disable' , False ) , ( 'name' , identity_fakes . user_name ) ] #NEWLINE# parsed_args = self . check_parser ( self . cmd , arglist , mocker ) #NEWLINE# mocker = mock . Mock ( ) #NEWLINE# mocker . return_value = 'abc123' #NEWLINE# with mock . patch ( 'openstackclient.common.utils.get_password' , mocker ) : #NEWLINE# #INDENT# ( columns , data ) = self . cmd . take_action ( parsed_args ) #NEWLINE# #UNINDENT# kwargs = { #NEWLINE# #INDENT# 'name' : identity_fakes . user_name , #NEWLINE# 'default_project' : None , #NEWLINE# 'description' : None , #NEWLINE# 'domain' : None , #NEWLINE# 'email' : None , #NEWLINE# 'enabled' : True , #NEWLINE# 'password' : 'abc123' , #NEWLINE# #UNINDENT# } #NEWLINE# self . users_mock . create . assert_called_with ( ** kwargs ) #NEWLINE# self . assertEqual ( self . columns , columns ) #NEWLINE# self . assertEqual ( self . datalist , data )