#NEWLINE# def _prepare_review_submit_testing( self , project_options = None ) : #NEWLINE# #INDENT# if ( project_options is None ) : #NEWLINE# #INDENT# u2mail = config . USERS [ config . USER_2 ] [ 'email' ] #NEWLINE# project_options = { #NEWLINE# #INDENT# 'core-group' : u2mail , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# pname = ( 'p_%s' % create_random_str ( ) ) #NEWLINE# self . create_project ( pname , project_options ) #NEWLINE# un = config . ADMIN_USER #NEWLINE# gu = GerritUtils ( config . GATEWAY_URL , auth_cookie = config . USERS [ un ] [ 'auth_cookie' ] ) #NEWLINE# k_index = gu . add_pubkey ( config . USERS [ self ] [ 'pubkey' ] ) #NEWLINE# self . assertTrue ( gu . project_exists ( pname ) ) #NEWLINE# priv_key_path = set_private_key ( config . USERS [ un ] [ 'privkey' ] ) #NEWLINE# gitu = GerritGitUtils ( un , priv_key_path , config . USERS [ un ] [ 'email' ] ) #NEWLINE# url = ( 'ssh://%s@%s:29418/%s' % ( un , config . GATEWAY_HOST , pname ) ) #NEWLINE# clone_dir = gitu . clone ( url , pname ) #NEWLINE# self . dirs_to_delete . append ( os . path . dirname ( clone_dir ) ) #NEWLINE# gitu . add_commit_and_publish ( clone_dir , 'master' , 'Test commit' ) #NEWLINE# change_ids = gu . get_my_changes_for_project ( pname ) #NEWLINE# self . assertEqual ( len ( change_ids ) , 1 ) #NEWLINE# change_id = change_ids [ 0 ] #NEWLINE# return ( change_id , gu , k_index )