#NEWLINE# def assertContains( self , response , text ) : #NEWLINE# #INDENT# if hasattr ( response , 'status_code' ) : #NEWLINE# #INDENT# assert ( response . status_code == 200 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( response . status_int == 200 ) #NEWLINE# #UNINDENT# if hasattr ( response , 'testbody' ) : #NEWLINE# #INDENT# assert ( text in response . testbody ) , ( 'missing text %s' % text ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if hasattr ( response , 'body' ) : #NEWLINE# #INDENT# assert ( text in response . body ) , ( 'missing text %s' % text ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( text in response . content ) , ( 'missing text %s' % text )