def test_requestNegotiationEscapesIAC(self):
        """
        If the payload for a subnegotiation includes I{IAC}, it is escaped by
        L{telnet.Telnet.requestNegotiation} with another I{IAC}.

        See RFC 855.
        """
        transport = proto_helpers.StringTransport()
        self.protocol.makeConnection(transport)
        self.protocol.requestNegotiation(b'\x01', b'\xff')
        self.assertEqual(
            transport.value(),
            b'\xff\xfa\x01\xff\xff\xff\xf0')

        If the payload for a subnegotiation includes I{IAC}, it is escaped by
        L{telnet.Telnet.requestNegotiation} with another I{IAC}.

        See RFC 855.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_telnet.py