def test_update__validate_on_update_is_str_all():
    """
    When `Dynaconf(validate_on_update="all")`
    Should behave correctly (bypass, pass or raise)
    """
    settings = Dynaconf(validate_on_update="all")
    settings.validators.register(Validator("value_a", must_exist=True))
    settings.validators.register(Validator("value_int", eq=42))

    # should bypass
    settings.update({"value_b": "foo"}, validate=False)
    settings.update({"value_b": "foo"}, validate="random")
    settings.update({"value_b": "foo"}, validate=123)

    # should raise and accumulate errors
    with pytest.raises(ValidationError) as e:
        settings.update({"value_b": "not_a", "value_int": 41})

    assert len(e.value.details) == 2

    # should pass
    assert not settings.exists("value_a")
    settings.update({"value_a": "exists", "value_int": 42})

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