def setUp(self):
        """
        Set up a transport, a result stream and a protocol instance.
        """
        self.serverTransport = StringTransport()
        self.clientTransport = StringTransport()
        self.server = WorkerProtocol()
        self.server.makeConnection(self.serverTransport)
        self.client = FakeAMP()
        self.client.makeConnection(self.clientTransport)

        Set up a transport, a result stream and a protocol instance.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/_dist/test/test_worker.py