def mockDTPInstance(result):
            """
            Fake an incoming connection and create a mock DTPInstance so
            that PORT command will start processing the request.
            """
            self.serverProtocol.dtpFactory.deferred.callback(None)
            self.serverProtocol.dtpInstance = object()
            return result

            Fake an incoming connection and create a mock DTPInstance so
            that PORT command will start processing the request.
            
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_ftp.py