コード例 #1
0
ファイル: message.py プロジェクト: AdamPrzybyla/pyxmpp2
 def test_message_full(self):
     msg = Message(
             from_jid = JID("[email protected]/res"),
             to_jid = JID("*****@*****.**"),
             stanza_type = "normal",
             stanza_id = u"1",
             subject = u"Subject",
             body = u"The body",
             thread = u"thread-id")
     payload = ElementTree.Element(
                         "{http://pyxmpp.jajcus.net/xmlns/test}payload")
     ElementTree.SubElement(payload, 
                             "{http://pyxmpp.jajcus.net/xmlns/test}abc")
     payload = XMLPayload(payload)
     msg.add_payload(payload)
     self.check_message_full(msg)
     xml = msg.as_xml()
     self.check_message_full(Message(xml))
コード例 #2
0
ファイル: message.py プロジェクト: zeeying/pyxmpp2
 def test_message_full(self):
     msg = Message(
             from_jid = JID("[email protected]/res"),
             to_jid = JID("*****@*****.**"),
             stanza_type = "normal",
             stanza_id = u"1",
             subject = u"Subject",
             body = u"The body",
             thread = u"thread-id")
     payload = ElementTree.Element(
                         "{http://pyxmpp.jajcus.net/xmlns/test}payload")
     ElementTree.SubElement(payload,
                             "{http://pyxmpp.jajcus.net/xmlns/test}abc")
     payload = XMLPayload(payload)
     msg.add_payload(payload)
     self.check_message_full(msg)
     xml = msg.as_xml()
     self.check_message_full(Message(xml))