#NEWLINE# @ patch ( 'pinax.stripe.actions.subscriptions.create' ) #NEWLINE# def test_post( self , CreateMock ) : #NEWLINE# #INDENT# Customer . objects . create ( stripe_id = 'cus_1' , user = self . user ) #NEWLINE# self . client . login ( username = self . user . username , password = self . password ) #NEWLINE# response = self . client . post ( reverse ( 'pinax_stripe_subscription_create' ) , { #NEWLINE# #INDENT# 'plan' : self . plan . id , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEquals ( response . status_code , 302 ) #NEWLINE# self . assertRedirects ( response , reverse ( 'pinax_stripe_subscription_list' ) )