

@defer.inlineCallbacks
def test_delivery_SmppClientConnector(self):
    (yield self.connect('127.0.0.1', self.pbPort))
    (yield self.prepareRoutingsAndStartConnector())
    (yield self.smppc_factory.connectAndBind())
    self.smppc_factory.lastProto.PDUDataRequestReceived = mock.Mock(wraps=self.smppc_factory.lastProto.PDUDataRequestReceived)
    (yield self.triggerDeliverSmFromSMSC([self.DeliverSmPDU]))
    self.assertEqual(self.smppc_factory.lastProto.PDUDataRequestReceived.call_count, 1)
    received_pdu_1 = self.smppc_factory.lastProto.PDUDataRequestReceived.call_args_list[0][0][0]
    self.assertEqual(received_pdu_1.id, pdu_types.CommandId.deliver_sm)
    self.assertEqual(received_pdu_1.params['source_addr'], self.DeliverSmPDU.params['source_addr'])
    self.assertEqual(received_pdu_1.params['destination_addr'], self.DeliverSmPDU.params['destination_addr'])
    self.assertEqual(received_pdu_1.params['short_message'], self.DeliverSmPDU.params['short_message'])
    (yield self.smppc_factory.smpp.unbindAndDisconnect())
    (yield self.stopSmppClientConnectors())

dataset/ETHPy150Open jookies/jasmin/jasmin/routing/test/test_routing_deliver_sm.py DeliverSmSmppThrowingTestCases.test_delivery_SmppClientConnector/original