'Test the PWD command.
L{ftp.FTPClient.pwd} should return a Deferred which fires with a
sequence of one element which is a string representing the current
working directory on the server.
(XXX - This is a bad API)'

def test_PWD(self):

    def cbPwd(res):
        self.assertEqual(ftp.parsePWDResponse(res[0]), '/bar/baz')
    self._testLogin()
    d = self.client.pwd().addCallback(cbPwd)
    self.assertEqual(self.transport.value(), 'PWD\r\n')
    self.client.lineReceived('257    "/bar/baz"')
    return d
