#NEWLINE# def test_config( ) : #NEWLINE# #INDENT# ' Allow custom configuration ' #NEWLINE# router = MockRouter ( ) #NEWLINE# backend = RapidHttpBacked ( router = router , name = 'test_http_backend' ) #NEWLINE# backend . configure ( 'localhost' , 8080 , gateway_url = 'http://smsgateway.com' , params_outgoing = 'user=my_username&password=my_password&id=%(params_incoming)s&text=%(message)s' , params_incoming = 'id=%(phone_number)s&text=%(message)s' ) #NEWLINE# assert_equals ( 'http://smsgateway.com' , backend . gateway_url ) #NEWLINE# assert_equals ( 'user=my_username&password=my_password&id=%(params_incoming)s&text=%(message)s' , router . http_params_outgoing ) #NEWLINE# assert_equals ( 'id' , backend . incoming_phone_number_param ) #NEWLINE# assert_equals ( 'text' , backend . incoming_message_param )