def testJIDBareUser(self): """Test setting the bare JID with a user.""" j = JID('user@domain/resource') j.bare = 'otheruser@otherdomain' self.check_jid(j, 'otheruser', 'otherdomain', 'resource', 'otheruser@otherdomain', 'otheruser@otherdomain/resource', 'otheruser@otherdomain/resource')
def testJIDBareNoUser(self): """Test setting the bare JID without a user.""" j = JID('user@domain/resource') j.bare = 'otherdomain' self.check_jid(j, '', 'otherdomain', 'resource', 'otherdomain', 'otherdomain/resource', 'otherdomain/resource')