예제 #1
0
    def test_doesnt_have_support(self):
        expected_stdout = "something something else"
        expected_stderr = "something something else"
        expected_retval = 1
        mock_runner = mock.MagicMock(spec_set=CommandRunner)
        mock_runner.run.return_value = (expected_stdout, expected_stderr,
                                        expected_retval)

        self.assertFalse(lib.has_resource_wait_support(mock_runner))
        mock_runner.run.assert_called_once_with(
            [self.path("crm_resource"), "-?"])
예제 #2
0
    def test_doesnt_have_support(self):
        expected_output = "something something else"
        expected_retval = 1
        mock_runner = mock.MagicMock(spec_set=CommandRunner)
        mock_runner.run.return_value = (expected_output, expected_retval)

        self.assertFalse(
            lib.has_resource_wait_support(mock_runner)
        )
        mock_runner.run.assert_called_once_with(
            [self.path("crm_resource"), "-?"]
        )