def test_join(self):

        def cb(presence):
            self.assertEquals(self.occupantJID, presence.sender)

        # Join the room
        d = self.protocol.join(self.roomJID, self.nick)
        d.addCallback(cb)

        element = self.stub.output[-1]

        self.assertEquals('presence', element.name, "Need to be presence")
        self.assertNotIdentical(None, element.x, 'No muc x element')

        # send back user presence, they joined
        xml = """
            <presence from='%s@%s/%s'>
              <x xmlns='http://jabber.org/protocol/muc#user'>
                <item affiliation='member' role='participant'/>
              </x>
            </presence>
        """ % (self.roomIdentifier, self.service, self.nick)
        self.stub.send(parseXml(xml))
        return d
Send an e-mail representing the supplied review.
dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_muc.py/MUCClientProtocolTest.test_join--crossover with--dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/notifications/email.py/mail_review