#NEWLINE# def test_addSuccessFields( self ) : #NEWLINE# #INDENT# '\n        On a successful finish, L{Action.__exit__} adds fields from\n        L{Action.addSuccessFields} to the result message.\n        ' #NEWLINE# logger = MemoryLogger ( ) #NEWLINE# action = Action ( logger , 'uuid' , TaskLevel ( level = [ 1 ] ) , 'sys:me' ) #NEWLINE# with act as act : #NEWLINE# #INDENT# act . addSuccessFields ( x = 1 , y = 2 ) #NEWLINE# act . addSuccessFields ( z = 3 ) #NEWLINE# #UNINDENT# assertContainsFields ( self , logger . messages [ 0 ] , { #NEWLINE# #INDENT# 'x' : 1 , #NEWLINE# 'y' : 2 , #NEWLINE# 'z' : 3 , #NEWLINE# #UNINDENT# } )