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 68e7db6d4ed2d3904c99de55efb2508fb83e5b7e..905e800a8b866c899bb7204e2ac8056ea7509ef1 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 99274b686a4f29dae7d6b252b1a596c70be723ae..2869aaf0aa01e98aaf77f8ef5cbc728165d942c5 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)