

def test_echo(self):
    '\n        Test wire.Echo protocol: send some data and check it send it back.\n        '
    t = proto_helpers.StringTransport()
    a = wire.Echo()
    a.makeConnection(t)
    a.dataReceived('hello')
    a.dataReceived('world')
    a.dataReceived('how')
    a.dataReceived('are')
    a.dataReceived('you')
    self.assertEqual(t.value(), 'helloworldhowareyou')

dataset/ETHPy150Open twisted/twisted/twisted/test/test_protocols.py WireTests.test_echo/original