#NEWLINE# def test_send( self ) : #NEWLINE# #INDENT# 'Test successful send.' #NEWLINE# message = self . create_outgoing_message ( ) #NEWLINE# config = { #NEWLINE# #INDENT# 'sendsms_url' : 'http://example.com' , #NEWLINE# #UNINDENT# } #NEWLINE# backend = VumiBackend ( None , 'vumi' , ** config ) #NEWLINE# kwargs = backend . prepare_request ( message . id , message . text , [ message . connections [ 0 ] . identity ] , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# with patch ( 'rapidsms.backends.vumi.outgoing.requests.post' ) as mock_post : #NEWLINE# #INDENT# backend . send ( message . id , message . text , [ message . connections [ 0 ] . identity ] , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# mock_post . assert_called_once_with ( ** kwargs )