WidgetNoOp
A no-op placeholder script used by visual-only widgets (e.g. Page Break, Text Widget) that require a script dataType but do not need to query any data source. Returns a mock result to prevent unnecessary database queries.
python · Common Widgets
Details
| ID | WidgetNoOp |
|---|---|
| Language | python |
| From Version | 6.1.0 |
| Docker Image | demisto/python3:3.12.13.10404775 |
| Tags | widget |
README
WidgetNoOp
A no-op placeholder script used by visual-only widgets (e.g. Page Break, Text Widget) that require a script dataType but do not need to query any data source. Returns a mock result to prevent unnecessary database queries.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | widget |
| Cortex XSOAR Version | 6.1.0 |
Inputs
This script has no inputs.
Outputs
This script has no outputs.
import json import demistomock as demisto from WidgetNoOp import main def test_main(mocker): """ Given: - No input arguments (no-op script). When: - Running the main function. Then: - Ensure demisto.results is called once with the expected no-op payload. """ # Given mocker.patch.object(demisto, "results") # When main() # Then expected_groups = [{"name": "", "data": [], "color": "", "groups": []}] demisto.results.assert_called_once_with({"Type": 1, "ContentsFormat": "json", "Contents": json.dumps(expected_groups)})