#NEWLINE# def test_postApproved( self ) : #NEWLINE# #INDENT# '\n        L{INewsStorage.postRequest} posts the message if it includes an\n        I{Approved} header.\n        ' #NEWLINE# group = 'example.group' #NEWLINE# moderator = 'alice@example.com' #NEWLINE# mailhost = '127.0.0.1' #NEWLINE# sender = 'bob@example.org' #NEWLINE# articleID = messageid ( ) #NEWLINE# storage = self . getStorage ( [ group ] , { #NEWLINE# #INDENT# group : [ storage ] , #NEWLINE# #UNINDENT# } , mailhost , sender ) #NEWLINE# message = self . getApprovedMessage ( articleID , group ) #NEWLINE# result = storage . postRequest ( message ) #NEWLINE# def cbPosted( ignored ) : #NEWLINE# #INDENT# self . assertEqual ( self . _email , [ ] ) #NEWLINE# exists = storage . articleExistsRequest ( articleID ) #NEWLINE# exists . addCallback ( self . assertTrue ) #NEWLINE# return exists #NEWLINE# #UNINDENT# result . addCallback ( cbPosted ) #NEWLINE# return result