def test_set__validate_on_update_is_false():
    """
    When `Dynaconf(validate_on_update=False)`
    Should behave correctly (bypass, pass or raise)
    """
    settings = Dynaconf()  # validate = false
    settings.validators.register(Validator("value_a", must_exist=True))

    # should bypass
    settings.set("value_b", "foo")
    settings.set("value_b", "foo", validate="random")
    settings.set("value_b", "foo", validate=123)

    # should raise
    with pytest.raises(ValidationError):
        settings.set("value_b", "foo", validate=True)

    # should pass
    assert not settings.exists("value_a")
    settings.set("value_a", "foo", validate=True)

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