def test_handshakeStopWriting(self):
        """
        If some data is written to the transport in C{connectionMade}, but
        C{handshakeDone} doesn't like something it sees about the handshake, it
        can use C{abortConnection} to ensure that the application never
        receives that data.
        """
        client, server, pump = handshakingClientAndServer(b"untrustworthy",
                                                          True)
        wrappedServerProtocol = server.wrappedProtocol
        pump.flush()
        self.assertEqual(wrappedServerProtocol.received, [])

        If some data is written to the transport in C{connectionMade}, but
        C{handshakeDone} doesn't like something it sees about the handshake, it
        can use C{abortConnection} to ensure that the application never
        receives that data.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/test/test_tls.py