#NEWLINE# def assertLogged( self , test_case , msg ) : #NEWLINE# #INDENT# for record in self . buffer : #NEWLINE# #INDENT# s = self . format ( record ) #NEWLINE# if s . startswith ( msg ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# #UNINDENT# test_case . assertTrue ( False , ( 'Failed to find log message: ' + msg ) )