#NEWLINE# def _validate_action( self , result ) : #NEWLINE# #INDENT# '\n        Validate action result\n        ' #NEWLINE# if ( result == None ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if ( not isinstance ( result , dict ) ) : #NEWLINE# #INDENT# raise ValidationError ( 'Action result must be dictionary' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . _validate_msg ( result [ 'messages' ] ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise ValidationError ( "Action doesn't have message" ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . _validate_status ( self [ 'status' ] ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise ValidationError ( "Action doesn't have status" )