#NEWLINE# def test_reply_redirect( self ) : #NEWLINE# #INDENT# 'Posting a reply should redirect.' #NEWLINE# t = ThreadFactory ( ) #NEWLINE# u = UserFactory ( ) #NEWLINE# self . client . login ( username = u . username , password = 'testpass' ) #NEWLINE# url = reverse ( 'forums.reply' , args = [ t . forum . slug , t . id ] ) #NEWLINE# data = { #NEWLINE# #INDENT# 'content' : 'some content' , #NEWLINE# #UNINDENT# } #NEWLINE# r = self . client . post ( url , self , follow = False ) #NEWLINE# eq_ ( 302 , r . status_code ) #NEWLINE# assert ( t . forum . slug in r [ 'location' ] ) #NEWLINE# assert ( str ( t . id ) in r [ 'location' ] ) #NEWLINE# assert ( 'last=' in r [ 'location' ] )