

@defer.inlineCallbacks
def test_delivery_SmppClientConnector_with_network_error_code(self):
    'Related to #117'
    (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)
    DeliverSmPDU = copy.deepcopy(self.DeliverSmPDU)
    received_pdu_1.params['network_error_code'] = '\x03\x00\x00'
    (yield self.triggerDeliverSmFromSMSC([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['network_error_code'], DeliverSmPDU.params['network_error_code'])
    (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_with_network_error_code/VarMisuse@85/142 `DeliverSmPDU`->`received_pdu_1`