def test_prepNoCaseMapResource(self):
     """
     Test no case mapping of the resourcce part of the JID.
     """
     self.assertEqual(jid.prep("user", "hoST", "resource"),
                       ("user", "host", "resource"))
     self.assertNotEqual(jid.prep("user", "host", "Resource"),
                          ("user", "host", "resource"))
Example #2
0
 def test_prepNoCaseMapResource(self):
     """
     Test no case mapping of the resourcce part of the JID.
     """
     self.assertEqual(jid.prep("user", "hoST", "resource"),
                      ("user", "host", "resource"))
     self.assertNotEqual(jid.prep("user", "host", "Resource"),
                         ("user", "host", "resource"))
    def testPrep(self):
        # case map of user
        self.assertEquals(jid.prep("UsEr", "host", "resource"),
                          ("user", "host", "resource"))

        # case map of host
        self.assertEquals(jid.prep("user", "hoST", "resource"),
                          ("user", "host", "resource"))

        # no case map of resource
        self.assertNotEquals(jid.prep("user", "host", "Resource"),
                             ("user", "host", "resource"))
 def test_prepCaseMapHost(self):
     """
     Test case mapping of the host part of the JID.
     """
     self.assertEqual(
         jid.prep("user", "hoST", "resource"), ("user", "host", "resource")
     )
 def test_prepCaseMapUser(self):
     """
     Test case mapping of the user part of the JID.
     """
     self.assertEqual(
         jid.prep("UsEr", "host", "resource"), ("user", "host", "resource")
     )
 def test_prepCaseMapHost(self):
     """
     Test case mapping of the host part of the JID.
     """
     self.assertEqual(jid.prep("user", "hoST", "resource"),
                       ("user", "host", "resource"))
 def test_prepCaseMapUser(self):
     """
     Test case mapping of the user part of the JID.
     """
     self.assertEqual(jid.prep("UsEr", "host", "resource"),
                       ("user", "host", "resource"))