#NEWLINE# def test_redirects_to_update_subscriptions_on_success( self ) : #NEWLINE# #INDENT# 'Test that successful post redirects to update subscriptions.' #NEWLINE# client = Client ( ) #NEWLINE# client . post ( reverse ( 'login' ) , { #NEWLINE# #INDENT# 'username' : 'gracegrant@razzmatazz.local' , #NEWLINE# 'password' : 'moo' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( self . subscription1 . period , 'immediate' ) #NEWLINE# response = client . post ( reverse ( 'update_subscriptions' ) , { #NEWLINE# #INDENT# 'form-0-id' : self . subscription1 . pk , #NEWLINE# 'form-0-kind' : 'web' , #NEWLINE# 'form-0-period' : 'daily' , #NEWLINE# 'form-TOTAL_FORMS' : 1 , #NEWLINE# 'form-INITIAL_FORMS' : 1 , #NEWLINE# 'form-MAX_NUM_FORMS' : 1000 , #NEWLINE# #UNINDENT# } ) #NEWLINE# subscription1 = Subscription . objects . get ( pk = self . subscription1 . pk ) #NEWLINE# self . assertEqual ( subscription1 . period , 'daily' ) #NEWLINE# self . assertRedirects ( response , reverse ( 'update_subscriptions' ) )