#NEWLINE# def _test_formatFlatEvent_fieldNamesSame( self , event = None ) : #NEWLINE# #INDENT# '\n        The same format field used twice in one event is rendered twice.\n\n        @param event: An event to flatten.  If C{None}, create a new event.\n        @return: C{event} or the event created.\n        ' #NEWLINE# if ( event is None ) : #NEWLINE# #INDENT# counter = count ( ) #NEWLINE# class CountStr ( object ) : #NEWLINE# #INDENT# '\n                Hack\n                ' #NEWLINE# def __str__( self ) : #NEWLINE# #INDENT# return str ( next ( counter ) ) #NEWLINE# #UNINDENT# #UNINDENT# event = dict ( log_format = '{x} {x}' , x = CountStr ( ) ) #NEWLINE# #UNINDENT# flattenEvent ( event ) #NEWLINE# self . assertEqual ( formatEvent ( event ) , '0 1' ) #NEWLINE# return event