'Check that invalid config files are detected immediately.'

def testErrorDetection(self):

    test_conf = '\n[Section1]\ntest    =    val2'
    conf = config_lib.GrrConfigManager()
    conf.DEFINE_integer('Section1.test', 54, 'A    test    integer.')
    conf.Initialize(data=test_conf)
    errors = conf.Validate('Section1')
    self.assertTrue(('Invalid    value    val2    for    Integer' in str(errors['Section1.test'])))
