#NEWLINE# def test_withLogsSuccessfulFinishMessage( self ) : #NEWLINE# #INDENT# '\n        L{Action.__exit__} logs an action finish message on a successful block\n        finish.\n        ' #NEWLINE# logger = MemoryLogger ( ) #NEWLINE# action = Action ( logger , 'uuid' , TaskLevel ( level = [ 1 ] ) , 'sys:me' ) #NEWLINE# with action : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . assertEqual ( len ( logger . messages ) , 1 ) #NEWLINE# assertContainsFields ( action , logger . messages [ 0 ] , { #NEWLINE# #INDENT# 'task_uuid' : 'uuid' , #NEWLINE# 'task_level' : [ 1 , 1 ] , #NEWLINE# 'action_type' : 'sys:me' , #NEWLINE# 'action_status' : 'succeeded' , #NEWLINE# #UNINDENT# } )