UT: Add dummy timestamp to zerologon tests

This commit is contained in:
Kekoa Kaaikala 2022-10-07 20:34:35 +00:00
parent 88d2bf7140
commit 2e0ef1865b
1 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ def zerologon_exploiter_object(monkeypatch, mock_agent_event_queue):
@pytest.mark.slow
def test_assess_exploit_attempt_result_no_error(zerologon_exploiter_object, mock_agent_event_queue):
dummy_exploit_attempt_result = {"ErrorCode": 0}
assert zerologon_exploiter_object.assess_exploit_attempt_result(dummy_exploit_attempt_result)
assert zerologon_exploiter_object.assess_exploit_attempt_result(dummy_exploit_attempt_result, 0)
assert mock_agent_event_queue.publish.call_count == 1
assert mock_agent_event_queue.publish.call_args[0][0].__class__ is ExploitationEvent
assert mock_agent_event_queue.publish.call_args[0][0].success
@ -49,7 +49,7 @@ def test_assess_exploit_attempt_result_with_error(
):
dummy_exploit_attempt_result = {"ErrorCode": 1}
assert not zerologon_exploiter_object.assess_exploit_attempt_result(
dummy_exploit_attempt_result
dummy_exploit_attempt_result, 0
)
assert mock_agent_event_queue.publish.call_count == 1
assert mock_agent_event_queue.publish.call_args[0][0].__class__ is ExploitationEvent