UT: Add check if we publish events in Zerologon

This commit is contained in:
Ilija Lazoroski 2022-10-06 16:46:44 +02:00
parent a5e31ee998
commit f05d5be32f
1 changed files with 2 additions and 0 deletions

View File

@ -38,6 +38,7 @@ def test_assess_exploit_attempt_result_no_error(zerologon_exploiter_object, mock
dummy_exploit_attempt_result = {"ErrorCode": 0}
assert zerologon_exploiter_object.assess_exploit_attempt_result(dummy_exploit_attempt_result)
assert mock_agent_event_queue.publish.call_count == 1
assert mock_agent_event_queue.publish.call_args[0][0].success
@pytest.mark.slow
@ -49,6 +50,7 @@ def test_assess_exploit_attempt_result_with_error(
dummy_exploit_attempt_result
)
assert mock_agent_event_queue.publish.call_count == 1
assert not mock_agent_event_queue.publish.call_args[0][0].success
@pytest.mark.slow