예제 #1
0
    def test_XMPP_participant_jid_from_MUC_message_normal(self):
        # Real message from Hipchat MUC
        msg_txt = """
                <message xmlns="jabber:client" to="[email protected]/HipchatBot" type="groupchat" from="[email protected]/Guillaume BINET">
                   <body>test</body>
                </message>"""

        message = XMPPMessage(node=msg_txt)

        self.assertEqual(str(message.getFrom()), "[email protected]/Guillaume BINET")
        self.assertEqual(str(get_jid_from_message(message)), "[email protected]/Guillaume BINET")
예제 #2
0
파일: utils_tests.py 프로젝트: achew22/err
    def test_XMPP_participant_jid_from_MUC_message_normal(self):
        # Real message from Hipchat MUC
        msg_txt = """
                <message xmlns="jabber:client" to="[email protected]/HipchatBot" type="groupchat" from="[email protected]/Guillaume BINET">
                   <body>test</body>
                </message>"""

        message = Message(node=msg_txt)

        self.assertEqual(str(message.getFrom()),
                         "[email protected]/Guillaume BINET")
        self.assertEqual(str(get_jid_from_message(message)),
                         "[email protected]/Guillaume BINET")