Fix infinite callback loop.

This commit is contained in:
Lance Stout
2012-02-03 16:03:46 +01:00
parent 021c57205f
commit 85dd005abc
4 changed files with 139 additions and 20 deletions

View File

@@ -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)