#NEWLINE# def test_subscription_final_payment_attempt_failed_signal_fired( self ) : #NEWLINE# #INDENT# zebra_webhook_subscription_final_payment_attempt_failed . connect ( self . _signal_reciever ) #NEWLINE# self . assertEqual ( self . signal_kwargs , None ) #NEWLINE# test_post_data = { #NEWLINE# #INDENT# 'json' : simplejson . dumps ( { #NEWLINE# #INDENT# 'customer' : 1083 , #NEWLINE# 'event' : 'subscription_final_payment_attempt_failed' , #NEWLINE# 'subscription' : { #NEWLINE# #INDENT# 'status' : 'canceled' , #NEWLINE# 'start' : 1304585542 , #NEWLINE# 'plan' : { #NEWLINE# #INDENT# 'amount' : 2000 , #NEWLINE# 'interval' : 'month' , #NEWLINE# 'object' : 'plan' , #NEWLINE# 'id' : 'p_ag2NgWECmJ' , #NEWLINE# 'id' : 'silver' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'canceled_at' : 1304585552 , #NEWLINE# 'ended_at' : 1304585552 , #NEWLINE# 'object' : 'subscription' , #NEWLINE# 'current_period_end' : 1307263942 , #NEWLINE# 'id' : 'sub_kP4M63kFrb' , #NEWLINE# 'current_period_start' : 1304585542 , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) , #NEWLINE# #UNINDENT# } #NEWLINE# c = Client ( ) #NEWLINE# response = c . post ( reverse ( 'zebra:webhooks' ) , test_post_data ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# self . assertEqual ( c . signal_kwargs [ 'full_json' ] [ 'subscription' ] [ 'start' ] , 1304585542 )