Enable python-based tests in Linux AR

Signed-off-by: sweeneys <sweeneys@amazon.com>
This commit is contained in:
sweeneys
2021-11-10 15:34:08 -08:00
parent 04326673cb
commit c29ca07d54
4 changed files with 11 additions and 10 deletions
@@ -371,15 +371,15 @@ class TestProcessMatching(unittest.TestCase):
mock_log_warn.assert_called()
@mock.patch('psutil.wait_procs')
@mock.patch('logging.Logger.warning')
def test_SafeKillProcList_RaisesError_NoRaiseAndLogsError(self, mock_log_warn, mock_wait_procs):
@mock.patch('logging.Logger.debug')
def test_SafeKillProcList_RaisesError_NoRaiseAndLogsError(self, mock_log, mock_wait_procs):
mock_wait_procs.side_effect = psutil.PermissionError()
proc_mock = mock.MagicMock()
process_utils._safe_kill_processes(proc_mock)
mock_wait_procs.assert_called()
mock_log_warn.assert_called()
mock_log.assert_called()
@mock.patch('psutil.process_iter')
@mock.patch('logging.Logger.debug')