Skip to content

Commit

Permalink
adding test cases to complete the checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhanshu-metron committed Oct 29, 2024
1 parent 071bfc1 commit 61899f5
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Packs/Cybereason/Integrations/Cybereason/Cybereason_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 61899f5

Please sign in to comment.