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

def test_requestNegotiationEscapesIAC(self):

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