Details
| ID | GRAUpdateCaseStatus |
|---|---|
| Language | python |
| From Version | 5.5.0 |
| Docker Image | demisto/python3:3.12.13.10116658 |
| Tags | post-processing |
README
GRA Update Case Status
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | post-processing |
| Cortex XSOAR Version | 5.5.0 |
Inputs
| Argument Name | Description |
|---|---|
| closeNotes | Close Note |
| closeReason | Close reason |
Outputs
There are no outputs for this script.
import demistomock as demisto import graupdatecasestatus from graupdatecasestatus import closeCase _INCIDENT = {"id": 28862, "sourceInstance": "instance_name", "labels": [{"type": "caseId", "value": "CS-9999"}]} def test_gra_update_case_status(monkeypatch, mocker): """ Scenario: This script executes the 'gra-case-action' command to resolve case status as closed. Given - An alert incident When - Resolving case status Then - Ensure the correct parameters to the gra-case-action command """ monkeypatch.setattr(graupdatecasestatus, "_get_incident", lambda: _INCIDENT) execute_mocker = mocker.patch.object(demisto, "executeCommand") expected_command = "gra-case-action" expected_args = { "action": "closeCase", "subOption": "True Incident", "caseId": "CS-9999", "caseComment": "", "using": "instance_name", } closeCase() execute_mocker.assert_called_with(expected_command, expected_args)