def test_errReceived(self):
        """
        When data is passed to the errReceived method, it should be sent to
        the session's writeExtended method.
        """
        self.pp.errReceived(b'test data')
        self.assertEqual(self.session.conn.extData[self.session],
                [(1, b'test data')])

        When data is passed to the errReceived method, it should be sent to
        the session's writeExtended method.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_session.py