VerifyIPv4Indicator

Verify that the address is a valid IPv4 address.

python · VerifyIPv4Indicator

Details

IDVerifyIPv4Indicator
Languagepython
From Version5.5.0
Docker Imagedemisto/python3:3.12.13.10116658
Tagsindicator-format

README

Verify that the address is a valid IPv4 address.

import demistomock as demisto
from VerifyIPv4Indicator import main


def test_main(mocker):
    """
    Given:
        - MAC Address as input
    When:
        - Running the script
    Then:
        - Ensure the MAC address is caught as invalid IPv4 and returns empty string
    """
    mocker.patch.object(demisto, "args", return_value={"input": "8.8.8.343"})
    mocker.patch.object(demisto, "results")
    main()
    demisto.results.assert_called_with("")