def test_CDUP(self):
        """
        Test the CDUP command.

        L{ftp.FTPClient.cdup} should return a Deferred which fires with a
        sequence of one element which is the string the server sent
        indicating that the command was executed successfully.

        (XXX - This is a bad API)
        """
        def cbCdup(res):
            self.assertEqual(res[0], '250 Requested File Action Completed OK')

        self._testLogin()
        d = self.client.cdup().addCallback(cbCdup)
        self.assertEqual(self.transport.value(), b'CDUP\r\n')
        self.transport.clear()
        self.client.lineReceived(b'250 Requested File Action Completed OK')
        return d

        Test the CDUP command.

        L{ftp.FTPClient.cdup} should return a Deferred which fires with a
        sequence of one element which is the string the server sent
        indicating that the command was executed successfully.

        (XXX - This is a bad API)
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_ftp.py