forked from p15670423/monkey
UT: Modify unit tests for ExploitTelem and PostBreachTelem based on previous changes
This commit is contained in:
parent
8c2eab4c2a
commit
57b710fb10
|
@ -19,7 +19,6 @@ HOST_AS_DICT = {
|
|||
"default_tunnel": None,
|
||||
"default_server": None,
|
||||
}
|
||||
EXPLOITER = SSHExploiter(HOST)
|
||||
EXPLOITER_NAME = "SSHExploiter"
|
||||
EXPLOITER_INFO = {
|
||||
"display_name": SSHExploiter._EXPLOITED_SERVICE,
|
||||
|
@ -35,7 +34,7 @@ RESULT = False
|
|||
|
||||
@pytest.fixture
|
||||
def exploit_telem_test_instance():
|
||||
return ExploitTelem(EXPLOITER, RESULT)
|
||||
return ExploitTelem(EXPLOITER_NAME, HOST, RESULT, EXPLOITER_INFO, EXPLOITER_ATTEMPTS)
|
||||
|
||||
|
||||
def test_exploit_telem_send(exploit_telem_test_instance, spy_send_telemetry):
|
||||
|
|
|
@ -20,10 +20,9 @@ class StubSomePBA:
|
|||
|
||||
@pytest.fixture
|
||||
def post_breach_telem_test_instance(monkeypatch):
|
||||
PBA = StubSomePBA()
|
||||
monkeypatch.setattr(PostBreachTelem, "_get_hostname_and_ip", lambda: (HOSTNAME, IP))
|
||||
monkeypatch.setattr(PostBreachTelem, "_get_os", lambda: OS)
|
||||
return PostBreachTelem(PBA, RESULT)
|
||||
return PostBreachTelem(PBA_NAME, PBA_COMMAND, RESULT)
|
||||
|
||||
|
||||
def test_post_breach_telem_send(post_breach_telem_test_instance, spy_send_telemetry):
|
||||
|
|
Loading…
Reference in New Issue