summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-12-08 18:59:04 +0100
committermathieui <mathieui@mathieui.net>2020-12-08 18:59:04 +0100
commitd37182804102682a715df43c48a6d874835cd71a (patch)
treee8bf12aebda1f723ca7c2c072e70466760c481f0 /tests
parent8258202681b32fb7267562a9fe3a5af03eb17f50 (diff)
parentb63dc3bc8cf16177a6e50a804681958a47497550 (diff)
downloadslixmpp-d37182804102682a715df43c48a6d874835cd71a.tar.gz
slixmpp-d37182804102682a715df43c48a6d874835cd71a.tar.bz2
slixmpp-d37182804102682a715df43c48a6d874835cd71a.tar.xz
slixmpp-d37182804102682a715df43c48a6d874835cd71a.zip
Merge branch 'rai' into 'master'
XEP-0437: Room Activity Indicators See merge request poezio/slixmpp!83
Diffstat (limited to 'tests')
-rw-r--r--tests/test_stanza_xep_0437.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/test_stanza_xep_0437.py b/tests/test_stanza_xep_0437.py
new file mode 100644
index 00000000..b210660b
--- /dev/null
+++ b/tests/test_stanza_xep_0437.py
@@ -0,0 +1,28 @@
+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)