def test_is_not_in_set_case_insensitive_throws_error_on_matching_set(value: str, set: list):
    """
    Tests that the `is_not_in_set_case_insensitive()` method throws an ArgumentError when its value is present
    in the supplied set, case insensitive.
    """
    # Arrange
    validator = StringValidator(value, 'value')

    # Assert
    with pytest.raises(ArgumentError):
        # Act
        validator.is_not_in_set_case_insensitive(set)
def test_is_not_in_set_case_insensitive_accepts_value_not_in_set(value: str, set: list):
    """
    Tests that the `is_not_in_set_case_insensitive()` method accepts when its value is not present
    in the supplied set, case insensitive.
    """
    # Arrange
    validator = StringValidator(value, 'value')

    # Act
    try:
        validator.is_not_in_set_case_insensitive(set)
    # Assert
    except ArgumentError:
        pytest.fail(f'`{value}` should be in the set `{set}`, but an error occurred.')
def test_is_not_in_set_case_insensitive_returns_validator_self():
    """
    Tests if the `is_not_in_set_case_insensitive()` validator method returns itself after the validation is performed,
    so that additional validations can be performed.
    """
    # Arrange
    value = '1234'
    set = ['test']
    validator = StringValidator(value, 'value')

    # Act
    validator_returned = validator.is_not_in_set_case_insensitive(set)

    # Assert
    assert validator_returned is validator