diff --git a/tests/objects/test_operation.py b/tests/objects/test_operation.py index 0db4454bc..ec5b3de49 100644 --- a/tests/objects/test_operation.py +++ b/tests/objects/test_operation.py @@ -17,6 +17,7 @@ from app.objects.secondclass.c_result import Result from app.objects.secondclass.c_fact import Fact from app.utility.base_object import BaseObject +from app.utility.base_world import BaseWorld LINK1_DECIDE_TIME = MOCK_LINK_FINISH_TIME = '2021-01-01T08:00:00Z' LINK1_COLLECT_TIME = '2021-01-01T08:01:00Z' @@ -74,6 +75,12 @@ def _encode_command(command_str): return _encode_command +@pytest.fixture +def setup_op_config(): + BaseWorld.apply_config(name='main', config={'exfil_dir': '/tmp/caldera', + 'reports_dir': '/tmp'}) + + @pytest.fixture def op_for_event_logs(operation_agent, operation_adversary, executor, ability, operation_link, encoded_command, parse_datestring): @@ -263,6 +270,9 @@ def test_event_logs(self, event_loop, op_for_event_logs, operation_agent, file_s event_logs = event_loop.run_until_complete(op_for_event_logs.event_logs(file_svc, data_svc)) assert event_logs == want + @pytest.mark.usefixtures( + "setup_op_config" + ) def test_writing_event_logs_to_disk(self, event_loop, op_for_event_logs, operation_agent, file_svc, data_svc, event_log_op_start_time, op_agent_creation_time, fire_event_mock): event_loop.run_until_complete(data_svc.remove('agents', match=dict(unique=operation_agent.unique)))