summaryrefslogtreecommitdiff
path: root/tests/test_stanza_xep_0437.py
blob: b210660b973697795155d2379b25b5a280b5b1d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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)