#NEWLINE# def testFlagSignals( self ) : #NEWLINE# #INDENT# 'Test signals emitted by the comment flag view' #NEWLINE# def receive( sender , **kwargs ) : #NEWLINE# #INDENT# self . assertEqual ( kwargs [ 'flag' ] . flag , CommentFlag . SUGGEST_REMOVAL ) #NEWLINE# self . assertEqual ( kwargs [ 'request' ] . user . username , 'normaluser' ) #NEWLINE# received_signals . append ( kwargs . get ( 'signal' ) ) #NEWLINE# #UNINDENT# received_signals = [ ] #NEWLINE# signals . comment_was_flagged . connect ( receive ) #NEWLINE# self . testFlagPost ( ) #NEWLINE# self . assertEqual ( self , [ signals . comment_was_flagged ] )