#NEWLINE# def test_no_requeue_added_pickmes( self ) : #NEWLINE# #INDENT# added_request = copy . deepcopy ( self . fake_request ) #NEWLINE# added_request [ 'state' ] = 'added' #NEWLINE# added_request [ 'tags' ] = 'no-conflicts' #NEWLINE# pickme_request = copy . deepcopy ( self . fake_request ) #NEWLINE# pickme_request [ 'state' ] = 'pickme' #NEWLINE# pickme_request [ 'tags' ] = 'no-conflicts' #NEWLINE# with nested ( mock . patch ( 'pushmanager.core.git.GitQueue.create_or_update_local_repo' ) , mock . patch ( 'pushmanager.core.git.GitQueue.git_merge_pickme' ) , mock . patch ( 'pushmanager.core.git.git_branch_context_manager' ) , mock . patch ( 'pushmanager.core.git.git_merge_context_manager' ) , mock . patch ( 'pushmanager.core.git.GitQueue._get_request_ids_in_push' ) , mock . patch ( 'pushmanager.core.git.GitQueue._get_request' ) , mock . patch ( 'pushmanager.core.git.GitQueue.enqueue_request' ) , mock . patch ( 'pushmanager.core.git.GitQueue._get_branch_sha_from_repo' ) , mock . patch ( 'pushmanager.core.git.GitQueue._sha_exists_in_master' ) ) as ( update_repo , merge_pickme , branch_mgr , merge_mgr , ids_in_push , get_req , enqueue_req , get_sha , sha_in_master ) : #NEWLINE# #INDENT# def throw_gitexn( * args ) : #NEWLINE# #INDENT# raise GitException ( 'GitException!' , gitret = 1 , giterr = 'some_stderr_string' , gitout = 'some_stdout_string' ) #NEWLINE# #UNINDENT# merge_mgr . side_effect = throw_gitexn #NEWLINE# ids_in_push . return_value = [ 2 ] #NEWLINE# get_req . return_value = pickme_request #NEWLINE# get_sha . return_code = 'some_sha' #NEWLINE# sha_in_master . return_value = False #NEWLINE# ( conflicts , _ ) = GitQueue . _test_pickme_conflict_pickme ( 0 , added_request , 'some_test_branch' , '/local/repo/path' , pushmanager_url , True ) #NEWLINE# assert ( conflicts is False ) #NEWLINE# enqueue_req . assert_has_calls ( [ mock . call ( GitTaskAction . TEST_PICKME_CONFLICT , 2 , pushmanager_url = pushmanager_url , requeue = False ) ] )