allow mirrors if conf is set, but clear it for tests

This commit is contained in:
Victor Shyba 2018-08-07 13:55:45 -03:00
parent 9511040d5a
commit d21313e590
2 changed files with 2 additions and 1 deletions

View file

@ -57,7 +57,7 @@ class ManagedEncryptedFileDownloader(EncryptedFileSaver):
self.channel_name = None
self.metadata = None
self.mirror = None
if download_mirrors:
if download_mirrors or conf.settings['download_mirrors']:
self.mirror = HTTPBlobDownloader(
self.blob_manager, servers=download_mirrors or conf.settings['download_mirrors']
)

View file

@ -495,6 +495,7 @@ create_stream_sd_file = {
def mock_conf_settings(obj, settings={}):
settings.setdefault('download_mirrors', [])
conf.initialize_settings(False)
original_settings = conf.settings
conf.settings = conf.Config(conf.FIXED_SETTINGS, conf.ADJUSTABLE_SETTINGS)