From 067a143f2c6810cab2522c66e127ea263adc5649 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 30 Sep 2022 13:16:04 -0400 Subject: [PATCH] UT: Fix bug in test mock --- .../cc/agent_event_handlers/test_scan_event_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/agent_event_handlers/test_scan_event_handler.py b/monkey/tests/unit_tests/monkey_island/cc/agent_event_handlers/test_scan_event_handler.py index c2325ed45..82ede960f 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/agent_event_handlers/test_scan_event_handler.py +++ b/monkey/tests/unit_tests/monkey_island/cc/agent_event_handlers/test_scan_event_handler.py @@ -267,7 +267,7 @@ def test_machine_not_upserted_if_existing_machine_has_os( ): machine_with_os = TARGET_MACHINE machine_with_os.operating_system = OperatingSystem.WINDOWS - machine_repository.get_machine_by_ip = MagicMock(return_value=machine_with_os) + machine_repository.get_machines_by_ip = MagicMock(return_value=[machine_with_os]) scan_event_handler.handle_ping_scan_event(PING_SCAN_EVENT)