

@defer.inlineCallbacks
def test_long_content_delivery_SAR_HttpConnector(self):
    (yield self.connect('127.0.0.1', self.pbPort))
    source_connector = Connector(id_generator())
    (yield self.prepareRoutingsAndStartConnector(source_connector))
    basePdu = DeliverSM(source_addr='1234', destination_addr='4567', short_message='', sar_total_segments=3, sar_msg_ref_num=int(id_generator(size=2, chars=string.digits)))
    pdu_part1 = copy.deepcopy(basePdu)
    pdu_part2 = copy.deepcopy(basePdu)
    pdu_part3 = copy.deepcopy(basePdu)
    pdu_part1.params['short_message'] = '__1st_part_with_153_char________________________________________________________________________________________________________________________________.'
    pdu_part1.params['sar_segment_seqnum'] = 1
    pdu_part2.params['short_message'] = '__2nd_part_with_153_char________________________________________________________________________________________________________________________________.'
    pdu_part2.params['sar_segment_seqnum'] = 2
    pdu_part3.params['short_message'] = '__3rd_part_end.'
    pdu_part3.params['sar_segment_seqnum'] = 3
    (yield self.triggerDeliverSmFromSMSC([pdu_part1, pdu_part2, pdu_part3]))
    self.assertEqual(self.AckServerResource.render_GET.call_count, 1)
    receivedHttpReq = self.AckServerResource.last_request.args
    self.assertEqual(len(receivedHttpReq), 8)
    self.assertEqual(pdu_part2['from'], [basePdu.params['source_addr']])
    self.assertEqual(receivedHttpReq['to'], [basePdu.params['destination_addr']])
    self.assertEqual(receivedHttpReq['content'], [((pdu_part1.params['short_message'] + pdu_part2.params['short_message']) + pdu_part3.params['short_message'])])
    self.assertEqual(receivedHttpReq['binary'], [binascii.hexlify(((pdu_part1.params['short_message'] + pdu_part2.params['short_message']) + pdu_part3.params['short_message']))])
    self.assertEqual(receivedHttpReq['origin-connector'], [source_connector.cid])
    (yield self.stopConnector(source_connector))

dataset/ETHPy150Open jookies/jasmin/jasmin/routing/test/test_routing_deliver_sm.py DeliverSmHttpThrowingTestCases.test_long_content_delivery_SAR_HttpConnector/VarMisuse@225/440 `receivedHttpReq`->`pdu_part2`