def test_load_file__validate_on_update_is_str_all(tmpdir, valid, invalid):
    """
    When `Dynaconf(validate_on_update="all")`
    Should behave correctly (bypass, pass or raise accumulating errors)
    """
    # setup files
    file_with_valid = mkfile(tmpdir, valid["fname"], valid["data"])
    file_with_invalid = mkfile(tmpdir, invalid["fname"], invalid["data"])

    # setup dyna
    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.load_file(file_with_invalid, validate=False)
    settings.load_file(file_with_invalid, validate="random")
    settings.load_file(file_with_invalid, validate=123)

    # should raise and accumulate errors
    with pytest.raises(ValidationError) as e:
        settings.load_file(file_with_invalid)

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

    # should pass
    assert not settings.exists("value_a")
    settings.load_file(file_with_valid)

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