slixmpp/tests/test_stanza_xep_0437.py
mathieui b63dc3bc8c XEP-047: Room Activity Indicators
Implement the XEP
2020-12-08 18:56:26 +01:00

28 lines
650 B
Python

import unittest
from slixmpp import Presence, JID
from slixmpp.test import SlixTest
from slixmpp.plugins.xep_0437 import stanza
class TestRAI(SlixTest):
def setUp(self):
stanza.register_plugins()
def testResponse(self):
presence = Presence()
presence['rai']['activities'] = [
JID('toto@titi'),
JID('coucou@coucou'),
]
self.check(presence, """
<presence>
<rai xmlns="urn:xmpp:rai:0">
<activity>toto@titi</activity>
<activity>coucou@coucou</activity>
</rai>
</presence>
""", use_values=False)
suite = unittest.TestLoader().loadTestsFromTestCase(TestRAI)