def test_process_logs(mocker, mock_config, names, expected): mock_config({ 'logs': OrderedDict([('b', object()), ('a', object()), ('c', object())]) }) process_log = mocker.patch('logstapo.logs.process_log') process_logs(names) process_log.assert_has_calls([call(x) for x in expected])
def test_process_logs(mocker, mock_config, names, expected): mock_config({'logs': OrderedDict([('b', object()), ('a', object()), ('c', object())])}) process_log = mocker.patch('logstapo.logs.process_log') process_logs(names) process_log.assert_has_calls([call(x) for x in expected])
def run(): """Run logstapo on all configured logs and perform actions""" results = process_logs() run_actions(results)