def test_client_dataReceived(self):
        """
        SSHSession.dataReceived() passes data along to a client.  If the data
        comes before there is a client, the data should be discarded.
        """
        self.session.dataReceived(b'1')
        self.session.client = StubClient()
        self.session.dataReceived(b'2')
        self.assertEqual(self.session.client.transport.buf, b'2')

        SSHSession.dataReceived() passes data along to a client.  If the data
        comes before there is a client, the data should be discarded.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_session.py