@inlineCallbacks
def test_callback_url_with_trailing_slash(self):
    (yield self.get_transport({'base_url': 'http://www.example.com/foo/'}))
    ussd_string = '*1234#'
    user_content = 'Well, what is it you want?'
    d = self.tx_helper.mk_request(request=user_content, to_addr=ussd_string)
    [msg] = (yield self.tx_helper.wait_for_dispatched_inbound(1))
    self.assert_inbound_message(msg, session_event=TransportUserMessage.SESSION_RESUME, content=user_content, to_addr=ussd_string)
    reply_content = 'We want ... a shrubbery!'
    reply = msg.reply(reply_content, continue_session=True)
    self.tx_helper.dispatch_outbound(reply)
    response = (yield d)
    self.assert_outbound_message(response.delivered_body, reply_content, self.callback_url(ussd_string), continue_session=True)
    [ack] = (yield self.tx_helper.wait_for_dispatched_events(1))
    self.assert_ack(ack, reply)
@inlineCallbacks
def test_callback_url_with_trailing_slash(self):
    (yield self.get_transport({'base_url': 'http://www.example.com/foo/'}))
    ussd_string = '*1234#'
    user_content = 'Well, what is it you want?'
    d = self.tx_helper.mk_request(request=user_content, to_addr=ussd_string)
    [msg] = (yield self.tx_helper.wait_for_dispatched_inbound(1))
    self.assert_inbound_message(msg, session_event=TransportUserMessage.SESSION_RESUME, content=user_content, to_addr=ussd_string)
    reply_content = 'We want ... a shrubbery!'
    reply = msg.reply(reply_content, continue_session=True)
    self.tx_helper.dispatch_outbound(reply)
    response = (yield d)
    self.assert_outbound_message(response.delivered_body, reply_content, self.callback_url(ussd_string), continue_session=True)
    [ack] = (yield self.tx_helper.wait_for_dispatched_events(1))
    self.assert_ack(ack, reply)