Пример #1
0
    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())
Пример #2
0
    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())
Пример #3
0
 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")
Пример #4
0
 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")