The usage of HTTPParse in class TestBiomajHTTPDownload (and a bit in TestBiomajHTTPSDownload) is messy:
setUp creates an HTTPParse object (self.http_parse) used in most tests but some tests recreate or modify it. The usage of date_format is weird.
The value of date_format in the config file contains quotes which seems wrong (and may explain why date_format is set several times for no apparent reason).
This PR cleans the situation:
The common self.http_parse is created once and not modified and the value of date_format is correct.
Tests that need a custom HTTPParse create it (using the value in the config file if possible).
The usage of
HTTPParse
in classTestBiomajHTTPDownload
(and a bit inTestBiomajHTTPSDownload
) is messy:setUp
creates anHTTPParse
object (self.http_parse
) used in most tests but some tests recreate or modify it. The usage ofdate_format
is weird.date_format
in the config file contains quotes which seems wrong (and may explain whydate_format
is set several times for no apparent reason).This PR cleans the situation:
self.http_parse
is created once and not modified and the value ofdate_format
is correct.HTTPParse
create it (using the value in the config file if possible).We also clean some useless code.