From b63dc3bc8cf16177a6e50a804681958a47497550 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 7 Dec 2020 22:27:28 +0100 Subject: XEP-047: Room Activity Indicators Implement the XEP --- tests/test_stanza_xep_0437.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/test_stanza_xep_0437.py (limited to 'tests') 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, """ + + + toto@titi + coucou@coucou + + + """, use_values=False) + + +suite = unittest.TestLoader().loadTestsFromTestCase(TestRAI) -- cgit v1.2.3