Esempio n. 1
0
 def setUp(self):
     self.channel = DummyChannel()
     self.request = request = Request(self.channel, False)
     # Simulate request handling
     request.startedWriting = True
     transport = WebSocketHixieTransport(request)
     self.handler = TestHandler(transport)
     transport._attachHandler(self.handler)
Esempio n. 2
0
 def setUp(self):
     self.channel = DummyChannel()
     request = Request(self.channel, False)
     transport = WebSocketHixieTransport(request)
     handler = TestHandler(transport)
     transport._attachHandler(handler)
     self.decoder = WebSocketHixieFrameDecoder(request.transport, handler)
     self.decoder.MAX_LENGTH = 100
     self.decoder.MAX_BINARY_LENGTH = 1000