import threading import unittest from slixmpp.test import SlixTest class TestOOB(SlixTest): def tearDown(self): self.stream_close() def testSendOOB(self): """Test sending an OOB transfer request.""" self.stream_start(plugins=['xep_0066', 'xep_0030']) url = 'http://github.com/fritzy/Slixmpp/blob/master/README' self.xmpp['xep_0066'].send_oob('user@example.com', url, desc='Slixmpp README') self.send(""" http://github.com/fritzy/Slixmpp/blob/master/README Slixmpp README """) self.recv(""" """) suite = unittest.TestLoader().loadTestsFromTestCase(TestOOB)