forked from p15670423/monkey
UT: Simplify test_mimikatz_credentials_stolen_event_published
This commit is contained in:
parent
2c3b29493f
commit
4334740002
|
@ -121,15 +121,12 @@ def test_pypykatz_result_parsing_no_secrets(monkeypatch):
|
|||
|
||||
def test_mimikatz_credentials_stolen_event_published(monkeypatch):
|
||||
mock_event_queue = MagicMock(spec=IEventQueue)
|
||||
mock_subscriber = mock_pypykatz_handler = Mock()
|
||||
mock_pypykatz_handler = Mock()
|
||||
monkeypatch.setattr(
|
||||
"infection_monkey.credential_collectors.mimikatz_collector.pypykatz_handler",
|
||||
mock_pypykatz_handler,
|
||||
)
|
||||
|
||||
for event_tag in MIMIKATZ_EVENT_TAGS:
|
||||
mock_event_queue.subscribe_tag(event_tag, mock_subscriber)
|
||||
|
||||
mimikatz_credential_collector = MimikatzCredentialCollector(mock_event_queue)
|
||||
collected_credentials = mimikatz_credential_collector.collect_credentials()
|
||||
|
||||
|
|
Loading…
Reference in New Issue