diff --git a/monkey/tests/unit_tests/infection_monkey/exploit/test_zerologon.py b/monkey/tests/unit_tests/infection_monkey/exploit/test_zerologon.py index 4a6fbf53d..d3854d57c 100644 --- a/monkey/tests/unit_tests/infection_monkey/exploit/test_zerologon.py +++ b/monkey/tests/unit_tests/infection_monkey/exploit/test_zerologon.py @@ -1,5 +1,10 @@ +from unittest.mock import MagicMock + import pytest +from common.event_queue import IAgentEventQueue +from infection_monkey.model import VictimHost + DOMAIN_NAME = "domain-name" IP = "0.0.0.0" NETBIOS_NAME = "NetBIOS Name" @@ -20,6 +25,8 @@ def zerologon_exploiter_object(monkeypatch): obj = ZerologonExploiter() monkeypatch.setattr(obj, "dc_name", NETBIOS_NAME, raising=False) monkeypatch.setattr(obj, "report_login_attempt", mock_report_login_attempt) + monkeypatch.setattr(obj, "host", VictimHost(ip_addr="1.1.1.1")) + monkeypatch.setattr(obj, "agent_event_queue", MagicMock(spec=IAgentEventQueue)) return obj