コード例 #1
0
 def test_monitor(self):
     resource.resource_unmanage_cmd(
         self.lib, ["R1", "R2"], dict_to_modifiers(dict(monitor=True)),
     )
     self.resource.unmanage.assert_called_once_with(
         ["R1", "R2"], with_monitor=True
     )
コード例 #2
0
 def test_no_args(self):
     with self.assertRaises(CmdLineInputError) as cm:
         resource.resource_unmanage_cmd(self.lib, [],
                                        dict_to_modifiers(dict()))
     self.assertEqual(cm.exception.message,
                      "You must specify resource(s) to unmanage")
     self.resource.unmanage.assert_not_called()
コード例 #3
0
 def test_more_resources(self):
     resource.resource_unmanage_cmd(
         self.lib, ["R1", "R2"], dict_to_modifiers(dict())
     )
     self.resource.unmanage.assert_called_once_with(
         ["R1", "R2"], with_monitor=False
     )
コード例 #4
0
ファイル: test_resource.py プロジェクト: CtrlZmaster/pcs
 def test_one_resource(self):
     resource.resource_unmanage_cmd(self.lib, ["R1"], dict_to_modifiers({}))
     self.resource.unmanage.assert_called_once_with(["R1"],
                                                    with_monitor=False)