def test_outReceived(self):
        """
        When data is passed to the outReceived method, it should be sent to
        the session's write method.
        """
        self.pp.outReceived(b'test data')
        self.assertEqual(self.session.conn.data[self.session],
                [b'test data'])

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