def test_getModeratorList(self):

        def cb(items):
            self.assertEquals(1, len(items))
            item = items[0]
            self.assertEquals(JID(u'hag66@shakespeare.lit'), item.entity)
            self.assertEquals(u'thirdwitch', item.nick)
            self.assertEquals(u'moderator', item.role)

        d = self.protocol.getModeratorList(self.roomJID)
        d.addCallback(cb)

        iq = self.stub.output[-1]
        self.assertEquals('get', iq.getAttribute('type'))
        query = "/iq/query[@xmlns='%s']/item[@xmlns='%s']" % (muc.NS_MUC_ADMIN,
                                                              muc.NS_MUC_ADMIN)
        items = xpath.queryForNodes(query, iq)
        self.assertNotIdentical(None, items)
        self.assertEquals(1, len(items))
        self.assertEquals('moderator', items[0].getAttribute('role'))

        response = toResponse(iq, 'result')
        query = response.addElement((NS_MUC_ADMIN, 'query'))
        item = query.addElement('item')
        item['affiliation'] ='member'
        item['jid'] = 'hag66@shakespeare.lit'
        item['nick'] = 'thirdwitch'
        item['role'] = 'moderator'
        self.stub.send(response)

        return d
Retrieving the moderator returns a list of L{muc.AdminItem}s.
dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_muc.py/MUCClientProtocolTest.test_getModeratorList