#NEWLINE# @ patch ( 'stripe.Charge.retrieve' ) #NEWLINE# @ patch ( 'pinax.stripe.actions.charges.sync_charge_from_stripe_data' ) #NEWLINE# def test_process_webhook( self , SyncMock , RetrieveMock ) : #NEWLINE# #INDENT# event = Event . objects . create ( kind = ChargeCapturedWebhook . name , webhook_message = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , valid = True , processed = False ) #NEWLINE# event . validated_message = dict ( data = dict ( object = dict ( id = 1 ) ) ) #NEWLINE# ChargeCapturedWebhook ( event ) . process_webhook ( ) #NEWLINE# self . assertTrue ( SyncMock . called )