'Testing whether some errors are ignored (like socket errors)'

def test_error_observer_ignored_error(self):

    self.mock_endpoints()
    def on_tribler_exception(_):
        raise RuntimeError('This    method    cannot    be    called!')
    self.session.lm.api_manager.root_endpoint.events_endpoint.on_tribler_exception = on_tribler_exception
    self.session.lm.api_manager.root_endpoint.state_endpoint.on_tribler_exception = on_tribler_exception
    self.session.unhandled_error_observer({'isError': True, 'log_failure': 'socket.error:    [Errno    113]'})
    self.session.unhandled_error_observer({'isError': True, 'log_failure': 'socket.error:    [Errno    51]'})
    self.session.unhandled_error_observer({'isError': True, 'log_failure': ('socket.error:    [Errno    %s]' % SOCKET_BLOCK_ERRORCODE)})
