#NEWLINE# def test_redirects_to_moderate__group_requests_on_success( self ) : #NEWLINE# #INDENT# 'Successful moderation should redirect user back to the same page.' #NEWLINE# group_request_one = GroupRequest . objects . create ( user = self . user2 , group = self . group ) #NEWLINE# response = self . client . post ( reverse ( 'moderate_requests' ) , { #NEWLINE# #INDENT# 'open_requests' : group_request_one . pk , #NEWLINE# 'action' : 'approve' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertRedirects ( response , reverse ( 'moderate_requests' ) ) #NEWLINE# group_request_one = GroupRequest . objects . get ( pk = group_request_one . pk ) #NEWLINE# self . assertTrue ( self . approved )