forked from p15670423/monkey
UT: Add check if we publish events in Zerologon
This commit is contained in:
parent
a5e31ee998
commit
f05d5be32f
|
@ -38,6 +38,7 @@ def test_assess_exploit_attempt_result_no_error(zerologon_exploiter_object, mock
|
||||||
dummy_exploit_attempt_result = {"ErrorCode": 0}
|
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)
|
||||||
assert mock_agent_event_queue.publish.call_count == 1
|
assert mock_agent_event_queue.publish.call_count == 1
|
||||||
|
assert mock_agent_event_queue.publish.call_args[0][0].success
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.slow
|
@pytest.mark.slow
|
||||||
|
@ -49,6 +50,7 @@ def test_assess_exploit_attempt_result_with_error(
|
||||||
dummy_exploit_attempt_result
|
dummy_exploit_attempt_result
|
||||||
)
|
)
|
||||||
assert mock_agent_event_queue.publish.call_count == 1
|
assert mock_agent_event_queue.publish.call_count == 1
|
||||||
|
assert not mock_agent_event_queue.publish.call_args[0][0].success
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.slow
|
@pytest.mark.slow
|
||||||
|
|
Loading…
Reference in New Issue