Closed duboism closed 4 years ago
405 error code is returned in test, but i do not know if this is always the case with all servers. Maybe should be tested with a local python flask app for example to be sure
Comment on my comment, after thinking about previous other tests, if head is not supported, yes 405 will be raised, and we should just continue in this case. In case of other errors, ok to raise exception
This PR addresses some errors introduced by #30. There are 2 classes of errors.
First, direct downloaders were broken and I missed that:
POST
resources) the remote server may not supportHEAD
and return405
which makesDirectHTTPDownload.list()
fail while we can simply ignore this error in this case.cURL
inDirectFTPDownload.list()
leads to return code350
which is OK but causes the method to fail.Next, tests in PR #30 were flawed and therefore some errors were not detected. The main errors here are:
assertRegexp
no longer exists (it was replaced byassertRegex
) but this was not detected because it was inassertRaises
context. While at it, we don't use anymore the deprecatedassertRaisesRegexp
(the history of names inunittest
can be found here).assertLogs
and the regex used in test were incorrect but this was not detected for the same reason.RSYNCDownload.list()
were not correctly logged but it was detected.Last but not least,
IRODSDownload
was not updated.Status:
RSYNCDownload
are corrected.DirectHTTPDownload.list()
, we explicitly consider405
as a non-error in this case but we won't get metadata.DirectFTPDownload.list()
, we explicitely consider350
a correct return code in this case.IRODSDownload.list()
now raises exceptions and log messages as other downloaders.