From 83de8bf929fe65e8f4e536d4c1167c50625c21f7 Mon Sep 17 00:00:00 2001
From: Erwan Rouchet <rouchet@teklia.com>
Date: Mon, 30 Aug 2021 13:55:55 +0200
Subject: [PATCH] Change default value for user_configuration

---
 arkindex_worker/worker/base.py | 2 +-
 tests/test_base_worker.py      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arkindex_worker/worker/base.py b/arkindex_worker/worker/base.py
index f9f9928e..1c76157c 100644
--- a/arkindex_worker/worker/base.py
+++ b/arkindex_worker/worker/base.py
@@ -62,7 +62,7 @@ class BaseWorker(object):
         logger.info(f"Worker will use {self.work_dir} as working directory")
 
         self.process_information = None
-        self.user_configuration = None
+        self.user_configuration = {}
         self.support_cache = support_cache
         # use_cache will be updated in configure() if the cache is supported and if there
         # is at least one available sqlite database either given or in the parent tasks
diff --git a/tests/test_base_worker.py b/tests/test_base_worker.py
index e1d45078..4e8c3c01 100644
--- a/tests/test_base_worker.py
+++ b/tests/test_base_worker.py
@@ -136,7 +136,7 @@ def test_configure_dev_mode(
     assert worker.process_information is None
     assert worker.worker_version_id == "12341234-1234-1234-1234-123412341234"
     assert worker.is_read_only is True
-    assert worker.user_configuration is None
+    assert worker.user_configuration == {}
 
 
 def test_configure_worker_run(mocker, monkeypatch, responses, mock_config_api):
-- 
GitLab