本文整理匯總了Python中smpp.pdu_builder.DeliverSM.get_obj方法的典型用法代碼示例。如果您正苦於以下問題:Python DeliverSM.get_obj方法的具體用法?Python DeliverSM.get_obj怎麽用?Python DeliverSM.get_obj使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類smpp.pdu_builder.DeliverSM
的用法示例。
在下文中一共展示了DeliverSM.get_obj方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_ordering
# 需要導入模塊: from smpp.pdu_builder import DeliverSM [as 別名]
# 或者: from smpp.pdu_builder.DeliverSM import get_obj [as 別名]
def test_ordering(self):
"""
Out of order pieces must be re-assembled in-order
"""
sar_1 = DeliverSM(
1,
short_message='\x00\x03\xff\x04\x01There she was just a')
sar_2 = DeliverSM(
1,
short_message='\x00\x03\xff\x04\x02 walking down the street,')
sar_3 = DeliverSM(
1,
short_message='\x00\x03\xff\x04\x03 singing doo wa diddy')
sar_4 = DeliverSM(
1,
short_message='\x00\x03\xff\x04\x04 diddy dum diddy do')
multi = MultipartMessage()
multi.add_pdu(sar_3.get_obj())
multi.add_pdu(sar_4.get_obj())
multi.add_pdu(sar_2.get_obj())
multi.add_pdu(sar_1.get_obj())
self.assertEquals(multi.get_completed()['message'], (
'There she was just a walking down the street, '
'singing doo wa diddy diddy dum diddy do'))