Fix time machine config validator on old-style config

Existing config won't have the keys defined, so make sure we skip in that case (and just use the defaults)
This commit is contained in:
Joseph Schorr 2017-04-27 14:24:47 -04:00
parent 66b98e5380
commit 4ea4ee3aa4
2 changed files with 13 additions and 3 deletions

View file

@ -2,7 +2,13 @@ import pytest
from util.config.validators import ConfigValidationException
from util.config.validators.validate_timemachine import TimeMachineValidator
from util.morecollections import AttrDict
@pytest.mark.parametrize('unvalidated_config', [
({}),
])
def test_validate_noop(unvalidated_config):
TimeMachineValidator.validate(unvalidated_config, None, None)
@pytest.mark.parametrize('default_exp,options,expected_exception', [
('2d', ['1w', '2d'], None),