'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 test_CDUP(self):

    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(), 'CDUP\r\n')
    self.transport.clear()
    self.client.lineReceived('250    Requested    File    Action    Completed    OK')
    return d
