def test_CHANNEL_REQUEST_FAILURE(self):
        """
        Test that channel request failure messages cause the Deferred to be
        erred back.
        """
        channel = TestChannel()
        self._openChannel(channel)
        d = self.conn.sendRequest(channel, b'test', b'', True)
        self.conn.ssh_CHANNEL_FAILURE(b'\x00\x00\x00\x00')
        def check(result):
            self.assertEqual(result.value.value, 'channel request failed')
        d.addCallback(self.fail)
        d.addErrback(check)
        return d

        Test that channel request failure messages cause the Deferred to be
        erred back.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_connection.py