def _dict_values_match(*args, **kwargs):
 matchers = dict(*args, **kwargs)
 def extract_val(key):
  def extract_val_for_key(d):
   return d.get(key)
  return extract_val_for_key
 return MatchesAll(*list((AfterPreprocessing(extract_val(key), value) for (key, value) in matchers.iteritems())))

def _dict_values_match ( * args , ** kwargs ) : matchers = dict ( * args , ** kwargs ) def extract_val ( key ) : def extract_val_for_key ( d ) : return d . get ( key ) return extract_val_for_key return MatchesAll ( * list ( ( AfterPreprocessing ( extract_val ( key ) , value ) for ( key , value ) in matchers . iteritems ( ) ) ) )
matcher that matches a dict where each of they keys match the matcher passed in .