#NEWLINE# @ mock . patch . object ( Site . objects , 'get_current' ) #NEWLINE# def test_watch_forum_then_new_thread_as_self( self , get_current ) : #NEWLINE# #INDENT# get_current . return_value . domain = 'testserver' #NEWLINE# f = ForumFactory ( ) #NEWLINE# watcher = UserFactory ( ) #NEWLINE# self . _toggle_watch_forum_as ( f , watcher , turn_on = True ) #NEWLINE# self . client . login ( username = watcher . username , password = 'testpass' ) #NEWLINE# post ( self . client , 'forums.new_thread' , { #NEWLINE# #INDENT# 'title' : 'a title' , #NEWLINE# 'content' : 'a post' , #NEWLINE# #UNINDENT# } , args = [ watcher . slug ] ) #NEWLINE# assert ( not mail . outbox )