summaryrefslogtreecommitdiff
path: root/tests/test_stream_handlers.py
AgeCommit message (Collapse)Author
2018-10-15fixing deprecation warnings for pytestFlorian Klien
2015-02-12Update the test suite.mathieui
- monkey-patch our own monkey-patched idle_call to run events immediatly rather than adding them to the event queue, and add a fake transport with a fake socket. - remove the test file related to xep_0059 as it relies on blocking behavior, and comment out one xep_0030 test uses xep_0059 - remove many instances of threading and sleep()s because they do nothing except waste time and introduce race conditions. - keep exactly two sleep() in IoT xeps because they rely on timeouts
2014-07-17Rename to slixmppFlorent Le Coz
2014-02-06Add test for wrong sender in IQLance Stout
2013-07-26refactor: no import * in testsJean-Philippe Caruana
2013-02-22Don't use internally deprecated methodsAnton Ryzhov
2012-10-31Relax timing issues in Iq timeout callback test.Lance Stout
2012-10-31Allow IQ timeouts to be asynchronous, by passing a timeout_callback ↵Joe Hildebrand
parameter to send(). An example modification of disco is included. If this approach is approved, I'll go through and update the other plugins.
2011-11-21Fix stream handler test for multiple handlers to exist properly.Lance Stout
2011-11-19Add unit test for copying stanzas when passed to events.Lance Stout
2011-06-01Begin experimental use of exceptions.Lance Stout
Provides IqTimeout and IqError which are raised when an Iq response does not arrive in time, or it arrives with type='error'.
2011-05-20Fix test timeout issue.Lance Stout
A better method than using time.sleep is needed. Maybe use queue.task_done to detect when event processing has ended? Research time!
2010-12-07Added option for iq.send to accept a callhandler.Lance Stout
The callback will be a stream level handler, and will not execute in its own thread. If you must have a thread, have the callback function raise a custom event, which can be processed by another event handler, which may run in an individual thread, like so: def handle_reply(self, iq): self.event('custom_event', iq) def do_long_operation_in_thread(self, iq): ... self.add_event_handler('custom_event', self.do_long_operation_in_thread) ...take out already prepared iq stanza... iq.send(callback=self.handle_reply)
2010-11-05Simplified SleekTest.Lance Stout
* check_stanza does not require stanza_class parameter. Introspection! * check_message, check_iq, and check_presence removed -- use check instead. * stream_send_stanza, stream_send_message, stream_send_iq, and stream_send_presence removed -- use send instead. * Use recv instead of recv_message, recv_presence, etc. * check_jid instead of check_JID * stream_start may accept multi=True to return a new SleekTest instance for testing multiple streams at once.
2010-10-07Unit test reorganization.Lance Stout
Moved SleekTest to sleekxmpp.test. Organized test suites by their focus. - Suites focused on testing stanza objects are named test_stanza_X.py - Suites focused on testing stream behavior are name test_stream_X.py