From 6f57bbcbeb3d8a6017c9df369b834ae023ad2c6b Mon Sep 17 00:00:00 2001
From: alaskowski <alaskowski@ethz.ch>
Date: Wed, 29 Mar 2023 15:55:03 +0200
Subject: [PATCH] SSDM-13529: Fixed determine_hostname parameters for addref
 obis method

---
 .../src/python/obis/dm/commands/openbis_command.py        | 5 ++---
 .../src/python/obis/dm/data_mgmt_test.py                  | 8 ++++----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/app-openbis-command-line/src/python/obis/dm/commands/openbis_command.py b/app-openbis-command-line/src/python/obis/dm/commands/openbis_command.py
index 68e7db6d4ed..905e800a8b8 100644
--- a/app-openbis-command-line/src/python/obis/dm/commands/openbis_command.py
+++ b/app-openbis-command-line/src/python/obis/dm/commands/openbis_command.py
@@ -22,7 +22,7 @@ import pybis
 from .. import config as dm_config
 from ..command_result import CommandException
 from ..command_result import CommandResult
-from ..utils import complete_openbis_config
+from ..utils import complete_openbis_config, OperationType
 
 
 class OpenbisCommand(object):
@@ -225,8 +225,7 @@ class OpenbisCommand(object):
         # ask user
         hostname = self.ask_for_hostname(socket.gethostname())
         # store
-        self.data_mgmt.config('config', True, False,
-                              prop='hostname', value=hostname, set=True)
+        self.data_mgmt.config('config', True, False, OperationType.SET, prop='hostname', value=hostname)
         return hostname
 
     def ask_for_hostname(self, hostname):
diff --git a/app-openbis-command-line/src/python/obis/dm/data_mgmt_test.py b/app-openbis-command-line/src/python/obis/dm/data_mgmt_test.py
index 99274b686a4..2869aaf0aa0 100644
--- a/app-openbis-command-line/src/python/obis/dm/data_mgmt_test.py
+++ b/app-openbis-command-line/src/python/obis/dm/data_mgmt_test.py
@@ -213,17 +213,17 @@ def test_external_dms_code_and_address(tmpdir):
         hostname = socket.gethostname()
         expected_edms_id = obis_sync.external_dms_id()
         result = obis_sync.git_wrapper.git_init()
-        assert result.failure() == False
+        assert result.failure() is False
         result = obis_sync.git_wrapper.git_top_level_path()
-        assert result.failure() == False
+        assert result.failure() is False
         edms_path, folder = os.path.split(result.output)
         path_hash = hashlib.sha1(edms_path.encode("utf-8")).hexdigest()[0:8]
         if expected_edms_id is None:
             expected_edms_id = "{}-{}-{}".format(user, hostname, path_hash).upper()
         # when
-        result = obis_sync.get_or_create_external_data_management_system();
+        result = obis_sync.get_or_create_external_data_management_system()
         # then
-        assert result.failure() == False
+        assert result.failure() is False
         dm.openbis.get_external_data_management_system.assert_called_with(expected_edms_id)
 
 
-- 
GitLab