#NEWLINE# def build_mock_validator( properties ) : #NEWLINE# #INDENT# return mock . Mock ( spec = [ 'schema' , 'validate' ] , schema = { #NEWLINE# #INDENT# 'properties' : dict ( ( ( name , { #NEWLINE# #INDENT# 'type' : type_ , #NEWLINE# #UNINDENT# } ) for ( name , type_ ) in properties . items ( ) ) ) , #NEWLINE# #UNINDENT# } )