예제 #1
0
파일: test_spec.py 프로젝트: abg/misc
def test_validate_missing():
    # run validation against an object with missing
    # values that the spec should provide via default
    # values
    path = os.path.join(os.path.dirname(__file__),
                        'data',
                        'mysqldump.spec')
    cfg = Config()
    assert_false(cfg.keys())
    spec = Configspec.read([path])
    spec.validate(cfg)

    assert_equals(cfg.keys(), spec.keys())