def getProtocol(self):
        """
        Return a new instance of C{self.protocol} connected to a new instance
        of L{proto_helpers.StringTransport}.
        """
        t = proto_helpers.StringTransport()
        a = self.protocol()
        a.makeConnection(t)
        return a

        Return a new instance of C{self.protocol} connected to a new instance
        of L{proto_helpers.StringTransport}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/test/test_basic.py