CortexXDRIdentityInformationWidget
This widget displays Cortex XDR identity information.
python · Cortex XDR by Palo Alto Networks
Details
| ID | CortexXDRIdentityInformationWidget |
|---|---|
| Language | python |
| From Version | 6.0.0 |
| Docker Image | demisto/python3:3.12.13.10116658 |
| Tags | dynamic-section |
README
This widget displays Cortex XDR identity information.
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 CortexXDRIdentityInformationWidget import pytest from CommonServerPython import * def util_load_json(path): with open(path, encoding="utf-8") as f: return json.loads(f.read()) @pytest.mark.parametrize( "context_data, expected_result", [ (util_load_json("test_data/context_data1.json"), util_load_json("test_data/expected_results1.json")), (util_load_json("test_data/context_data2.json"), util_load_json("test_data/expected_results2.json")), (util_load_json("test_data/context_data3.json"), util_load_json("test_data/expected_results3.json")), ], ) def test_additional_info(mocker, context_data, expected_result): mocker.patch.object(demisto, "context", return_value=context_data) results = CortexXDRIdentityInformationWidget.get_identity_info() for actual_res, expected_res in zip(results, expected_result): actual_access_keys = actual_res.pop("Access Keys") expected_access_keys = expected_res.pop("Access Keys") assert actual_res == expected_res assert set(actual_access_keys) == set(expected_access_keys) # the sorting of the access keys doesn't matter