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")
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")