def test_disconnectGEX_REPLYBadSignature(self):
        """
        Test that KEX_DH_GEX_REPLY disconnects if the signature is bad.
        """
        (exchangeHash, signature, packetStart) = self.begin_KEX_DH_GEX_REPLY()

        d = self.proto.ssh_KEX_DH_GEX_REPLY(
            packetStart + common.NS(b"bad signature"))
        return d.addCallback(
            lambda _: self.checkDisconnected(
                transport.DISCONNECT_KEY_EXCHANGE_FAILED)
        )

        Test that KEX_DH_GEX_REPLY disconnects if the signature is bad.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_transport.py