'Test a failure in PWD command.
When the PWD command fails, the returned Deferred should errback
with L{ftp.CommandFailed}.'

def test_failedPWD(self):

    self._testLogin()
    d = self.client.pwd()
    self.assertFailure(d, ftp.CommandFailed)
    self.assertEqual(self.transport.value(), 'PWD\r\n')
    self.client.lineReceived('550    /bar/baz:    No    such    file    or    directory')
    return d
