From 61bda27d7f8fb772987ac02a1d740c40b99b223a Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 30 Sep 2022 09:50:17 -0400 Subject: [PATCH] UT: Fix bug in test_handle_ping_scan_event test --- .../cc/agent_event_handlers/test_handle_ping_scan_event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/agent_event_handlers/test_handle_ping_scan_event.py b/monkey/tests/unit_tests/monkey_island/cc/agent_event_handlers/test_handle_ping_scan_event.py index d0af268e1..9849e893e 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/agent_event_handlers/test_handle_ping_scan_event.py +++ b/monkey/tests/unit_tests/monkey_island/cc/agent_event_handlers/test_handle_ping_scan_event.py @@ -245,7 +245,7 @@ def test_handle_scan_data__node_not_upserted_if_machine_storageerror( target_machine = TARGET_MACHINE target_machine.operating_system = None machine_repository.get_machine_by_id = MagicMock(side_effect=machine_from_id) - machine_repository.get_machines_by_ip = MagicMock(return_value=target_machine) + machine_repository.get_machines_by_ip = MagicMock(side_effect=machines_from_ip) machine_repository.upsert_machine = MagicMock(side_effect=StorageError) handler(EVENT)