#NEWLINE# def _toggle_watch_kbforum_as( self , username , document , turn_on = True ) : #NEWLINE# #INDENT# 'Watch a discussion forum and return it.' #NEWLINE# self . client . login ( username = username , password = 'testpass' ) #NEWLINE# user = User . objects . get ( username = username ) #NEWLINE# watch = ( 'yes' if turn_on else 'no' ) #NEWLINE# post ( self . client , 'wiki.discuss.watch_forum' , { #NEWLINE# #INDENT# 'watch' : watch , #NEWLINE# #UNINDENT# } , args = [ watch . slug ] ) #NEWLINE# if turn_on : #NEWLINE# #INDENT# assert NewThreadEvent . is_notifying ( user , document ) , 'NewThreadEvent should be notifying.' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( not NewThreadEvent . is_notifying ( user , document ) ) , 'NewThreadEvent should not be notifying.' #NEWLINE# #UNINDENT# return document