def test_negotiationWithNoProtocols(self):
        """
        When factories support L{IProtocolNegotiationFactory} but don't
        advertise support for any protocols, no protocols are negotiated.
        """
        client, server, clientDataReceived, serverDataReceived = (
            self.handshakeProtocols([], [])
        )

        def checkNegotiatedProtocol(ignored):
            self.assertEqual(client.negotiatedProtocol, None)
            self.assertEqual(server.negotiatedProtocol, None)

        clientDataReceived.addCallback(lambda ignored: serverDataReceived)
        serverDataReceived.addCallback(checkNegotiatedProtocol)

        return clientDataReceived

        When factories support L{IProtocolNegotiationFactory} but don't
        advertise support for any protocols, no protocols are negotiated.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/test/test_tls.py