def _validate_validator(obj_type, validator):
 reference_dict = VALIDATOR_SPECS[obj_type]
 assert (('id' in validator) and (validator['id'] in reference_dict))
 customization_keys = validator.keys()
 customization_keys.remove('id')
 assert (set(customization_keys) == set(reference_dict[validator['id']].keys()))
 for key in customization_keys:
  value = validator[key]
  schema = reference_dict[validator['id']][key]
  try:
   schema_utils.normalize_against_schema(value, schema)
  except Exception as e:
   raise AssertionError(e)
 validator_fn = schema_utils._Validators.get(validator['id'])
 assert (set(inspect.getargspec(validator_fn).args) == set((customization_keys + ['obj'])))

def _validate_validator ( obj_type , validator ) : reference_dict = VALIDATOR_SPECS [ obj_type ] assert ( ( 'id' in validator ) and ( validator [ 'id' ] in reference_dict ) ) customization_keys = validator . keys ( ) customization_keys . remove ( 'id' ) assert ( set ( customization_keys ) == set ( reference_dict [ validator [ 'id' ] ] . keys ( ) ) ) for key in customization_keys : value = validator [ key ] schema = reference_dict [ validator [ 'id' ] ] [ key ] try : schema_utils . normalize_against_schema ( value , schema ) except Exception as e : raise AssertionError ( e ) validator_fn = schema_utils . _Validators . get ( validator [ 'id' ] ) assert ( set ( inspect . getargspec ( validator_fn ) . args ) == set ( ( customization_keys + [ 'obj' ] ) ) )
validates the value of a validator field .