def setUp(self):
        """
        Create a fake protocol interpreter and a L{ftp.DTPFactory} instance to
        test.
        """
        self.reactor = task.Clock()

        class ProtocolInterpreter(object):
            dtpInstance = None

        self.protocolInterpreter = ProtocolInterpreter()
        self.factory = ftp.DTPFactory(
            self.protocolInterpreter, None, self.reactor)

        Create a fake protocol interpreter and a L{ftp.DTPFactory} instance to
        test.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_ftp.py