def test_callRemoteSuccessLocalCallbackErrorLogging(self):
        """
        If the last callback on the L{Deferred} returned by C{callRemote} (added
        by application code calling C{callRemote}) fails, the failure is passed
        to the sender's C{unhandledError} method.
        """
        self.sender.expectError()

        callResult = self.dispatcher.callRemote(Hello, hello=b'world')
        callResult.addCallback(lambda result: 1 // 0)

        self.dispatcher.ampBoxReceived(amp.AmpBox({
                    b'hello': b"yay", b'print': b"ignored", b'_answer': b"1"}))

        self._localCallbackErrorLoggingTest(callResult)

        If the last callback on the L{Deferred} returned by C{callRemote} (added
        by application code calling C{callRemote}) fails, the failure is passed
        to the sender's C{unhandledError} method.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_amp.py