#NEWLINE# def assertBody( self , value , msg = None ) : #NEWLINE# #INDENT# 'Fail if value != self.body.' #NEWLINE# if isinstance ( value , unicodestr ) : #NEWLINE# #INDENT# value = value . encode ( self . encoding ) #NEWLINE# #UNINDENT# if ( value != self . body ) : #NEWLINE# #INDENT# if ( msg is None ) : #NEWLINE# #INDENT# msg = ( 'expected body:\n%r\n\nactual body:\n%r' % ( value , value . body ) ) #NEWLINE# #UNINDENT# self . _handlewebError ( msg )