def test_outgoing_keys(self):
        message = self.create_outgoing_message()
        config = {
            "sendsms_url": "http://127.0.0.1:13013/cgi-bin/sendsms",
            "sendsms_params": {"smsc": "usb0-modem",
                               "from": "+SIMphonenumber",
                               "username": "rapidsms",
                               "password": "CHANGE-ME"},
            "coding": 0,
            "charset": "ascii",
            "encode_errors": "ignore",
        }
        backend = KannelBackend(None, "kannel", **config)
        kwargs = backend.prepare_request(1, message.text,
                                         [message.connections[0].identity], {})
        data = kwargs['params']
        self.assertEqual(config['sendsms_params']['smsc'], data['smsc'])
        self.assertEqual(config['sendsms_params']['from'], data['from'])
        self.assertEqual(config['sendsms_params']['username'],
                         data['username'])
        self.assertEqual(config['sendsms_params']['password'],
                         data['password'])
        self.assertEqual(message.connection.identity, data['to'])
        self.assertEqual(config['coding'], data['coding'])
        self.assertEqual(config['charset'], data['charset'])
        self.assertEqual(message.text, data['text'].decode(data['charset']))
Outgoing POST data should contain the proper keys.
dataset/ETHPy150Open rapidsms/rapidsms/rapidsms/backends/kannel/tests.py/KannelSendTest.test_outgoing_keys