#NEWLINE# def testPaymentSuccessfulSignal( self ) : #NEWLINE# #INDENT# received_signals = [ ] #NEWLINE# def receive( sender , **kwargs ) : #NEWLINE# #INDENT# received_signals . append ( kwargs . get ( 'signal' ) ) #NEWLINE# #UNINDENT# transaction_was_successful . connect ( receive ) #NEWLINE# resp = self . merchant . purchase ( 1 , received_signals . credit_card , options = fake_options ) #NEWLINE# self . assertEquals ( received_signals , [ transaction_was_successful ] )