本文整理汇总了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'))