forked from p15670423/monkey
UT: Fix Zerologon UTs
This commit is contained in:
parent
a927879334
commit
5ec05d5617
|
@ -1,7 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from infection_monkey.model.host import VictimHost
|
|
||||||
|
|
||||||
DOMAIN_NAME = "domain-name"
|
DOMAIN_NAME = "domain-name"
|
||||||
IP = "0.0.0.0"
|
IP = "0.0.0.0"
|
||||||
NETBIOS_NAME = "NetBIOS Name"
|
NETBIOS_NAME = "NetBIOS Name"
|
||||||
|
@ -19,8 +17,7 @@ def zerologon_exploiter_object(monkeypatch):
|
||||||
def mock_report_login_attempt(**kwargs):
|
def mock_report_login_attempt(**kwargs):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
host = VictimHost(IP, DOMAIN_NAME)
|
obj = ZerologonExploiter()
|
||||||
obj = ZerologonExploiter(host)
|
|
||||||
monkeypatch.setattr(obj, "dc_name", NETBIOS_NAME, raising=False)
|
monkeypatch.setattr(obj, "dc_name", NETBIOS_NAME, raising=False)
|
||||||
monkeypatch.setattr(obj, "report_login_attempt", mock_report_login_attempt)
|
monkeypatch.setattr(obj, "report_login_attempt", mock_report_login_attempt)
|
||||||
return obj
|
return obj
|
||||||
|
|
Loading…
Reference in New Issue