diff --git a/Packs/Cybereason/Integrations/Cybereason/Cybereason_test.py b/Packs/Cybereason/Integrations/Cybereason/Cybereason_test.py index f2ec26142631..ecd1b1d104ef 100644 --- a/Packs/Cybereason/Integrations/Cybereason/Cybereason_test.py +++ b/Packs/Cybereason/Integrations/Cybereason/Cybereason_test.py @@ -982,6 +982,37 @@ def test_malop_to_incident(mocker): with pytest.raises(Exception) as exc_info: command_output = malop_to_incident("args") assert exc_info.match(r"Cybereason raw response is not valid") + + +def test_malop_to_incident_status(mocker): + from Cybereason import malop_to_incident + args = { + "guidString": "12345A", + "status": "Remediated" + } + command_output = malop_to_incident(args) + + assert all([(command_output['name'] == "Cybereason Malop 12345A"), (command_output['status'] == 1)]) + + with pytest.raises(Exception) as exc_info: + command_output = malop_to_incident("args") + assert exc_info.match(r"Cybereason raw response is not valid") + + +def test_malop_to_incident_status_closed(mocker): + from Cybereason import malop_to_incident + args = { + "guidString": "12345A", + "status": "Closed" + } + command_output = malop_to_incident(args) + + assert all([(command_output['name'] == "Cybereason Malop 12345A"), (command_output['status'] == 2)]) + + with pytest.raises(Exception) as exc_info: + command_output = malop_to_incident("args") + assert exc_info.match(r"Cybereason raw response is not valid") + def test_get_pylum_id(mocker):