summaryrefslogtreecommitdiff
path: root/tests/test_stanza_xep_0047.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_stanza_xep_0047.py')
-rw-r--r--tests/test_stanza_xep_0047.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_stanza_xep_0047.py b/tests/test_stanza_xep_0047.py
index 1b212529..6aa2314b 100644
--- a/tests/test_stanza_xep_0047.py
+++ b/tests/test_stanza_xep_0047.py
@@ -73,5 +73,18 @@ class TestIBB(SleekTest):
self.assertTrue(errored, "ABCD?EFGH did not raise base64 error")
+ def testConvertData(self):
+ """Test that data is converted to base64"""
+ iq = Iq()
+ iq['type'] = 'set'
+ iq['ibb_data']['seq'] = 0
+ iq['ibb_data']['data'] = 'sleekxmpp'
+
+ self.check(iq, """
+ <iq type="set">
+ <data xmlns="http://jabber.org/protocol/ibb" seq="0">c2xlZWt4bXBw</data>
+ </iq>
+ """)
+
suite = unittest.TestLoader().loadTestsFromTestCase(TestIBB)