'The L{Deferred} returned by L{ftp.FTPClient.rename} is errbacked with
L{CommandFailed} if the I{RNFR} command receives an error response code
(for example, because the file does not exist).'

def test_renameFromToFailingOnFirstError(self):

    self._testLogin()
    d = self.client.rename('/spam', '/ham')
    self.assertEqual(self.transport.value(), 'RNFR    /spam\r\n')
    self.transport.clear()
    self.client.lineReceived('550    Requested    file    unavailable.\r\n')
    self.assertEqual(self.transport.value(), '')
    return self.assertFailure(d, ftp.CommandFailed)
