예제 #1
0
    def test_check_timing_fail(self, mock_exc, mock_timing):
        mock_exc.side_effect = processutils.ProcessExecutionError()
        mock_timing.return_value = None
        expected = [mock.call(), mock.call(False)]

        ipmi.check_timing_support()
        self.assertTrue(mock_exc.called)
        self.assertEqual(expected, mock_timing.call_args_list)
예제 #2
0
    def test_check_timing_fail(self, mock_exc, mock_timing):
        mock_exc.side_effect = processutils.ProcessExecutionError()
        mock_timing.return_value = None
        expected = [mock.call(), mock.call(False)]

        ipmi.check_timing_support()
        self.assertTrue(mock_exc.called)
        self.assertEqual(expected, mock_timing.call_args_list)
예제 #3
0
    def test_check_timing_pass(self, mock_exc, mock_timing):
        mock_exc.return_value = (None, None)
        mock_timing.return_value = None
        expected = [mock.call(), mock.call(True)]

        ipmi.check_timing_support()
        self.assertTrue(mock_exc.called)
        self.assertEqual(expected, mock_timing.call_args_list)
예제 #4
0
    def test_check_timing_pass(self, mock_exc, mock_timing):
        mock_exc.return_value = (None, None)
        mock_timing.return_value = None
        expected = [mock.call(), mock.call(True)]

        ipmi.check_timing_support()
        self.assertTrue(mock_exc.called)
        self.assertEqual(expected, mock_timing.call_args_list)