def setUp(self): super(TestRedirectorServer, self).setUp() # Allows us to watch what bytes are being sent to the client. self._channel = FakeServerChannel() # Allows us to write bytes to stdout, stderr without them going to the terminal. self._sys = FakeSys() self._server = RedirectorServer(self._channel, sys_impl=self._sys)
def setUp(self): self._client_sys = FakeSys() self._server_sys = FakeSys() self._fake_clock = scalyr_util.FakeClock() self._client_channel = FakeClientChannel(self._fake_clock) self._server_channel = FakeServerChannel(self._client_channel) self._client = RedirectorClient(self._client_channel, sys_impl=self._client_sys, fake_clock=self._fake_clock) self._server = RedirectorServer(self._server_channel, sys_impl=self._server_sys) self._client.start() self._server.start()