Details
| ID | IPReputation |
|---|---|
| Language | python |
| From Version | 5.0.0 |
| Docker Image | demisto/python3:3.12.13.10404775 |
| Tags | enhancement |
README
A context script for IP address entities.
Script Data
| Name | Description |
|---|---|
| Script Type | python |
| Tags | enhancement |
Inputs
| Argument Name | Description |
|---|---|
| ip | The IP address to look up. |
Outputs
There are no outputs for this script.
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 def test_ip_reputation(mocker): """ Given: - The script args. When: - Running ip_reputation function. Then: - Validating the outputs as expected. """ from IPReputation import ip_reputation mocker.patch.object(demisto, "args", return_value={"ip": "1.1.1.1"}) execute_command_res = [{"Type": 4, "Contents": "Error", "Brand": "brand"}] execute_mock = mocker.patch.object(demisto, "executeCommand", return_value=execute_command_res) results_mock = mocker.patch.object(demisto, "results") ip_reputation() assert execute_mock.call_count == 1 assert "returned an error" in results_mock.call_args[0][0][0]["Contents"]