def test_update__validate_on_update_is_true(valid_data, invalid_data):
    """
    When `Dynaconf(validate_on_update=True)`
    Should behave correctly (bypass, pass or raise)
    """
    settings = Dynaconf(validate_on_update=True)
    settings.validators.register(Validator("value_a", must_exist=True))

    # should bypass
    settings.update(invalid_data, validate=False)
    settings.update(invalid_data, validate="random")
    settings.update(invalid_data, validate=123)

    # should raise
    with pytest.raises(ValidationError):
        settings.update(invalid_data)

    # should pass
    assert not settings.exists("value_a")
    settings.update(valid_data)

    When `Dynaconf(validate_on_update=True)`
    Should behave correctly (bypass, pass or raise)
    
tests/test_base.py