#NEWLINE# def test_connectionTaskFailed( self ) : #NEWLINE# #INDENT# mock_cbt = mock . Mock ( ) #NEWLINE# mock_cbt . micro_status_entry = mock . Mock ( ) #NEWLINE# mock_cbt . micro_status_entry . fingerprint = 'test' #NEWLINE# mock_request_1 = mock . Mock ( ) #NEWLINE# mock_request_1 . errback = mock . Mock ( ) #NEWLINE# mock_request_2 = mock . Mock ( ) #NEWLINE# mock_request_2 . errback = mock . Mock ( ) #NEWLINE# self . cm . _pending_request_dict [ 'test' ] = [ mock_request_1 , mock_request_2 ] #NEWLINE# self . cm . connectionTaskFailed ( mock_request_1 , 'reason' ) #NEWLINE# self . assertTrue ( ( 'test' not in self . cm . _pending_request_dict ) ) #NEWLINE# mock_request_1 . errback . assert_called_once_with ( 'reason' ) #NEWLINE# mock_request_2 . errback . assert_called_once_with ( 'reason' )