#NEWLINE# def test_watch_thread( self ) : #NEWLINE# #INDENT# 'Watch then unwatch a thread.' #NEWLINE# t = ThreadFactory ( ) #NEWLINE# u = UserFactory ( ) #NEWLINE# self . client . login ( username = u . username , password = 'testpass' ) #NEWLINE# post ( self . client , 'forums.watch_thread' , { #NEWLINE# #INDENT# 'watch' : 'yes' , #NEWLINE# #UNINDENT# } , args = [ t . forum . slug , t . id ] ) #NEWLINE# assert NewPostEvent . is_notifying ( u , t ) #NEWLINE# assert ( not NewThreadEvent . is_notifying ( u , t . forum ) ) #NEWLINE# post ( self . client , 'forums.watch_thread' , { #NEWLINE# #INDENT# 'watch' : 'no' , #NEWLINE# #UNINDENT# } , args = [ t . forum . slug , t . id ] ) #NEWLINE# assert ( not NewPostEvent . is_notifying ( u , t ) )