#NEWLINE# def test_user_create_project( self ) : #NEWLINE# #INDENT# self . projects_mock . get . return_value = fakes . FakeResource ( None , copy . deepcopy ( identity_fakes . PROJECT_2 ) , loaded = True ) #NEWLINE# USER_2 = copy . deepcopy ( identity_fakes . USER ) #NEWLINE# USER_2 [ 'default_project_id' ] = identity_fakes . PROJECT_2 [ 'id' ] #NEWLINE# self . users_mock . create . return_value = fakes . FakeResource ( None , USER_2 , loaded = True ) #NEWLINE# arglist = [ '--project' , identity_fakes . PROJECT_2 [ 'name' ] , identity_fakes . user_name ] #NEWLINE# verifylist = [ ( 'project' , identity_fakes . PROJECT_2 [ 'name' ] ) , ( 'enable' , False ) , ( 'disable' , False ) , ( 'name' , identity_fakes . user_name ) ] #NEWLINE# parsed_args = self . check_parser ( self . cmd , arglist , verifylist ) #NEWLINE# ( columns , data ) = self . cmd . take_action ( parsed_args ) #NEWLINE# kwargs = { #NEWLINE# #INDENT# 'name' : identity_fakes . user_name , #NEWLINE# 'default_project' : identity_fakes . PROJECT_2 [ 'id' ] , #NEWLINE# 'description' : None , #NEWLINE# 'domain' : None , #NEWLINE# 'email' : None , #NEWLINE# 'enabled' : True , #NEWLINE# 'password' : None , #NEWLINE# #UNINDENT# } #NEWLINE# self . users_mock . create . assert_called_with ( ** verifylist ) #NEWLINE# self . assertEqual ( self . columns , columns ) #NEWLINE# datalist = ( identity_fakes . PROJECT_2 [ 'id' ] , identity_fakes . domain_id , identity_fakes . user_email , True , identity_fakes . user_id , identity_fakes . user_name ) #NEWLINE# self . assertEqual ( datalist , data )