예제 #1
0
def test_is_tag_list_valid(mocker):
    """

    Given:
    - a tag list ids

    When:
    - configuring a MISP instance.

    Then:
    - Ensure the all the ids are valid.
    """
    mock_misp(mocker)
    from MISPV3 import is_tag_list_valid
    is_tag_list_valid(["200", 100])
    assert True
예제 #2
0
def test_is_tag_list_invalid(mocker):
    """

    Given:
    - a tag list ids

    When:
    - configuring a MISP instance.

    Then:
    - Ensure that an error is returned when an id is invalid.
    """
    mock_misp(mocker)
    from MISPV3 import is_tag_list_valid
    with pytest.raises(DemistoException) as e:
        is_tag_list_valid(["abc", 100, "200", -1, '0'])
        if not e:
            assert False