'If the server returns a response code other than 250 in response to a
I{DELE} sent by L{ftp.FTPClient.removeFile}, the L{Deferred} returned
by C{removeFile} is errbacked with a L{Failure} wrapping a
L{CommandFailed}.'

def test_failedRemoveFile(self):

    self._testLogin()
    d = self.client.removeFile('/tmp/test')
    self.assertEqual(self.transport.value(), 'DELE    /tmp/test\r\n')
    response = '501    Syntax    error    in    parameters    or    arguments.'
    self.client.lineReceived(response.encode(self.client._encoding))
    d = self.assertFailure(d, ftp.CommandFailed)
    d.addCallback((lambda exc: self.assertEqual(exc.args, ([response],))))
    return d
