def test_identifier_parsing(self): id1 = Identifier(jid="[email protected]/toto") self.assertEqual(id1.getNode(), "gbin") self.assertEqual(id1.getDomain(), "gootz.net") self.assertEqual(id1.getResource(), "toto") id2 = Identifier(jid="*****@*****.**") self.assertEqual(id2.getNode(), "gbin") self.assertEqual(id2.getDomain(), "gootz.net") self.assertIsNone(id2.getResource())
def test_identifier_double_at_parsing(self): id1 = Identifier(jid="[email protected]@gootz.net/toto") self.assertEqual(id1.getNode(), "*****@*****.**") self.assertEqual(id1.getDomain(), "gootz.net") self.assertEqual(id1.getResource(), "toto")