#NEWLINE# def check_normalization( self , schema , mappings , invalid_items ) : #NEWLINE# #INDENT# 'Validates the schema and tests that values are normalized correctly.\n\n        Args:\n          schema: the schema to normalize the value against.\n          mappings: a list of 2-element tuples. The first element of\n            each item is expected to be normalized to the second.\n          invalid_items: a list of values. Each of these is expected to raise\n            an AssertionError when normalized.\n        ' #NEWLINE# validate_schema ( schema ) #NEWLINE# for ( raw_value , expected_value ) in mappings : #NEWLINE# #INDENT# self . assertEqual ( schema_utils . normalize_against_schema ( raw_value , schema ) , expected_value ) #NEWLINE# #UNINDENT# for value in value : #NEWLINE# #INDENT# with self . assertRaises ( Exception ) : #NEWLINE# #INDENT# schema_utils . normalize_against_schema ( value , schema )