def test_fromElementItem(self):
        xml = """
            <presence from='coven@chat.shakespeare.lit/thirdwitch'
                      to='crone1@shakespeare.lit/desktop'>
              <x xmlns='http://jabber.org/protocol/muc#user'>
                <item affiliation='member'
                      jid='hag66@shakespeare.lit/pda'
                      role='participant'
                      nick='thirdwitch'/>
              </x>
            </presence>
        """

        element = parseXml(xml)
        presence = muc.UserPresence.fromElement(element)
        self.assertEqual(u'member', presence.affiliation)
        self.assertEqual(u'participant', presence.role)
        self.assertEqual(JID('hag66@shakespeare.lit/pda'), presence.entity)
        self.assertEqual(u'thirdwitch', presence.nick)
Item attributes are parsed properly.
dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_muc.py/UserPresenceTest.test_fromElementItem