ShowCampaignHighestSeverity
Displays the highest severity among the incidents that make up the phishing campaign.
python · Phishing Campaign
Details
| ID | ShowCampaignHighestSeverity |
|---|---|
| Language | python |
| From Version | 6.0.0 |
| Docker Image | demisto/python3:3.12.13.10116658 |
| Tags | dynamic-section |
README
Displays the highest severity among the incidents that make up the phishing campaign.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | dynamic-section |
| Cortex XSOAR Version | 6.0.0 |
Inputs
There are no inputs for this script.
Outputs
There are no outputs for this script.
import pytest from ShowCampaignHighestSeverity import * data_test_get_incident_severity = [("data_test/get_incident.json", 3)] @pytest.mark.parametrize("incident_data_path, expected_severity", data_test_get_incident_severity) def test_get_incident_severity(mocker, incident_data_path, expected_severity): with open(incident_data_path) as incident_data_file: incident_data = json.load(incident_data_file) mocker.patch.object(demisto, "executeCommand", return_value=incident_data) assert get_incident_severity("test") == expected_severity data_test_incidents_id = [ ("data_test/demisto_context.json", ["937", "934", "935", "936", "940", "944", "943", "938", "941", "939"]) ] @pytest.mark.parametrize("context_data_path, expected_ids", data_test_incidents_id) def test_incidents_id(mocker, context_data_path, expected_ids): with open(context_data_path) as context_data_file: context_data = json.load(context_data_file) mocker.patch.object(demisto, "context", return_value=context_data) assert list(incidents_id()) == expected_ids