#NEWLINE# def testBasicAttributes( self ) : #NEWLINE# #INDENT# self . logger . info ( 'test' ) #NEWLINE# data = self . getLogData ( ) #NEWLINE# self . assertFalse ( ( 'descriptor' in data ) , 'undefined descriptor should be omitted' ) #NEWLINE# for messageId in ( 0 , 1 ) : #NEWLINE# #INDENT# self . assertSubstring ( ( '<messageId>%d</messageId>' % messageId ) , data ) #NEWLINE# #UNINDENT# record = data . splitlines ( ) [ ( - 1 ) ] #NEWLINE# self . assertFalse ( ( not record . startswith ( '<record>' ) ) ) #NEWLINE# self . assertFalse ( ( not record . endswith ( '</record>' ) ) ) #NEWLINE# for kw in ( 'level' , 'message' , 'messageId' , 'pid' , 'time' ) : #NEWLINE# #INDENT# self . assertSubstring ( ( '<%s>' % kw ) , record ) #NEWLINE# self . assertSubstring ( ( '</%s>' % kw ) , record )