#NEWLINE# @ mock . patch . object ( NewPostEvent , 'fire' ) #NEWLINE# def test_fire_on_reply( self , fire ) : #NEWLINE# #INDENT# 'The event fires when there is a reply.' #NEWLINE# t = ThreadFactory ( ) #NEWLINE# u = UserFactory ( ) #NEWLINE# self . client . login ( username = t . username , password = 'testpass' ) #NEWLINE# post ( self . client , 'wiki.discuss.reply' , { #NEWLINE# #INDENT# 'content' : 'a post' , #NEWLINE# #UNINDENT# } , args = [ t . document . slug , t . id ] ) #NEWLINE# assert fire . called