Skip to content

Commit f19cd5b

Browse files
committed
Dev: unittests: Adjust unit test for previous commit
1 parent c665a16 commit f19cd5b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/unittests/test_utils.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,11 +1052,13 @@ def test_set_dlm_option(mock_get_dict, mock_run):
10521052
mock_run_inst.get_stdout_or_raise_error.assert_called_once_with('dlm_tool set_config "key2=test"', None)
10531053

10541054

1055-
@mock.patch('crmsh.utils.has_resource_configured')
1056-
def test_is_dlm_configured(mock_configured):
1057-
mock_configured.return_value = True
1055+
@mock.patch('crmsh.xmlutil.CrmMonXmlParser')
1056+
def test_is_dlm_configured(mock_crmmon):
1057+
mock_crmmon_inst = mock.Mock()
1058+
mock_crmmon.return_value = mock_crmmon_inst
1059+
mock_crmmon_inst.is_resource_configured.return_value = True
10581060
assert utils.is_dlm_configured() is True
1059-
mock_configured.assert_called_once_with(constants.DLM_CONTROLD_RA, peer=None)
1061+
mock_crmmon_inst.is_resource_configured.assert_called_once_with(constants.DLM_CONTROLD_RA)
10601062

10611063

10621064
@mock.patch('crmsh.sh.cluster_shell')

0 commit comments

Comments
 (0)