def setUp(self): self.loop = tulip.new_event_loop() tulip.set_event_loop(self.loop) self.transport = unittest.mock.Mock() self.stream = tulip.StreamBuffer() self.response = HttpResponse('get', 'http://python.org')
def connection_made(self, transport): self.transport = transport self.stream = tulip.StreamBuffer() self._request_handler = self.start()
def connection_made(self, transport): print('Connection made') self.transport = transport self.stream = tulip.StreamBuffer() self.dispatch()
def setUp(self): self.loop = tulip.new_event_loop() tulip.set_event_loop(None) self.transport = unittest.mock.Mock() self.stream = tulip.StreamBuffer(loop=self.loop)
def connection_made(self, transport): self.transport = transport self.stream = tulip.StreamBuffer(loop=self._loop) self._request_handler = tulip.Task(self.start(), loop=self._loop)