InstancesCheck-FailedCategories
Health Check dynamic section, showing the top ten categories of the failed integrations in a pie chart.
Details
| ID | InstancesCheck-FailedCategories |
|---|---|
| Language | python |
| From Version | 6.0.0 |
| Docker Image | demisto/python3:3.12.13.10116658 |
| Tags | failedInstances dynamic-section |
README
Health Check dynamic section, showing the top ten categories of the failed integrations in a pie chart.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | failedInstances, 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 import demistomock as demisto from InstancesCheck_FailedCategories import main, random from test_data.constants import ( INCIDENTS_RESULTS, INCIDENTS_RESULTS_EXPECTED, INCIDENTS_RESULTS_NO_FAILED, INCIDENTS_RESULTS_NO_FAILED_EXPECTED, ) @pytest.mark.parametrize( "list_, expected", [(INCIDENTS_RESULTS, INCIDENTS_RESULTS_EXPECTED), (INCIDENTS_RESULTS_NO_FAILED, INCIDENTS_RESULTS_NO_FAILED_EXPECTED)], ) def test_script(mocker, list_, expected): mocker.patch.object(random, "randint", return_value=1000) mocker.patch.object(demisto, "incidents", return_value=list_) mocker.patch.object(demisto, "results") main() contents = demisto.results.call_args[0][0] assert contents == expected