def test_handshake(self):
        """
        The TLS handshake is performed when L{TLSMemoryBIOProtocol} is
        connected to a transport.
        """
        tlsClient, tlsServer, handshakeDeferred, _ = self.handshakeProtocols()

        # Only wait for the handshake to complete.  Anything after that isn't
        # important here.
        return handshakeDeferred

        The TLS handshake is performed when L{TLSMemoryBIOProtocol} is
        connected to a transport.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/test/test_tls.py