summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2011-05-25Merge branch 'develop' into rosterLance Stout
2011-05-25Fix test for get_roster().Lance Stout
Python2.6 has issues passing a Unicode string as a keyword name.
2011-05-20Merge branch 'develop' into stream_featuresLance Stout
2011-05-20Merge branch 'develop' into rosterLance Stout
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!
2011-05-20Fix test for Python3.Lance Stout
Issue of dict_keys vs list data types.
2011-05-20Make roster test a little more robust.Lance Stout
2011-05-20Merge branch 'develop' into rosterLance Stout
Conflicts: tests/test_stream_roster.py
2011-05-20Save progressLance Stout
2011-05-20Fix double roster entry issue with Unicode.Lance Stout
JIDs with Unicode values were being encoded by the JID class instead of leaving them as just Unicode strings. It may still be a good idea to use from __future__ import unicode_literals pretty much everywhere though. Fixes issue #88.
2011-05-20Merge branch 'develop' into stream_featuresLance Stout
Conflicts: sleekxmpp/clientxmpp.py
2011-05-20Merge branch 'develop' into rosterLance Stout
Conflicts: sleekxmpp/clientxmpp.py tests/test_stream_roster.py
2011-05-20Resolve timeout errors for get_roster.Lance Stout
See issue #89 Using get_roster will now return the same types of values as Iq.send. If a timeout occurs, then the event 'roster_timeout' will be fired. A successful call to get_roster will also raise the 'roster_received' event. To ensure that the get_roster call was successful, here is a pattern to follow: def __init__(self, ...): ... self.add_event_handler('session_start', self.session_start) self.add_event_handler('roster_timeout', self.roster_timeout) self.add_event_handler('roster_received', self.roster_received) def session_start(self, e): self.send_presence() self.get_roster() def roster_timeout(self, e): # Optionally increase the timeout period self.get_roster(timeout=self.response_timeout * 2) def roster_received(self, iq): # Do stuff, roster has been initialized. ...
2011-05-13Ensure that the XEP-0086 plugin is loaded.Lance Stout
Since the XEP-0086 plugin auto adds error code values, it must be reliably loaded or unloaded when certain tests are run so that stanzas may be matched. In this case, we ensure that the plugin is used.
2011-04-08Merge branch 'develop' into rosterLance Stout
2011-04-08Update tests to reflect XEP-0086 correcting error codes.Lance Stout
2011-03-24Merge branch 'develop' into stream_featuresLance Stout
2011-03-24Merge branch 'develop' into rosterLance Stout
2011-03-24Added new implementation for XEP-0086.Lance Stout
2011-03-24Allow a stanza plugin to override a parent's interfaces.Lance Stout
Each interface, say foo, may be overridden in three ways: set_foo get_foo del_foo To declare an override in a plugin, add the class field overrides as so: overrides = ['set_foo', 'del_foo'] Each override must have a matching set_foo(), etc method for implementing the new behaviour. To enable the overrides for a particular parent stanza, pass the option overrides=True to register_stanza_plugin. register_stanza_plugin(Stanza, Plugin, overrides=True) Example code: class Test(ElementBase): name = 'test' namespace = 'testing' interfaces = set(('foo', 'bar')) sub_interfaces = set(('bar',)) class TestOverride(ElementBase): name = 'test-override' namespace = 'testing' plugin_attrib = 'override' interfaces = set(('foo',)) overrides = ['set_foo'] def setup(self, xml): # Don't include an XML element in the parent stanza # since we're adding just an attribute. # If adding a regular subelement, no need to do this. self.xml = ET.Element('') def set_foo(self, value): print("overrides!") self.parent()._set_attr('foo', 'override-%s' % value) register_stanza_plugin(Test, TestOverride, overrides=True) Example usage: >>> t = TestStanza() >>> t['foo'] = 'bar' >>> t['foo'] 'override-bar'
2011-03-24Merge branch 'develop' into stream_featuresLance Stout
2011-03-24Merge branch 'develop' into rosterLance Stout
2011-03-24Added new XEP-0050 implementation.Lance Stout
Backward incompatibility alert! Please see examples/adhoc_provider.py for how to use the new plugin implementation, or the test examples in the files tests/test_stream_xep_0050.py and tests/test_stanza_xep_0050.py. Major changes: - May now have zero-step commands. Useful if a command is intended to be a dynamic status report that doesn't require any user input. - May use payloads other than data forms, such as a completely custom stanza type. - May include multiple payload items, such as multiple data forms, or a form and a custom stanza type. - Includes a command user API for calling adhoc commands on remote agents and managing the workflow. - Added support for note elements. Todo: - Add prev action support. You may use register_plugin('old_0050') to continue using the previous XEP-0050 implementation.
2011-03-23Merge branch 'develop' into stream_featuresLance Stout
2011-03-23Merge branch 'develop' into rosterLance Stout
2011-03-23Cleaned XEP-0249 plugin, added tests.Lance Stout
2011-03-22Merge branch 'develop' into stream_featuresLance Stout
2011-03-22Merge branch 'develop' into rosterLance Stout
2011-03-22Updated XEP-0128 plugin to work with the new XEP-0030 plugin.Lance Stout
Required fixing a few bugs in StanzaBase related to iterable substanzas.
2011-03-18Merge branch 'develop' into stream_featuresLance Stout
2011-02-24Merge branch 'develop' into rosterLance Stout
2011-02-24Add tests for XEP-0085, fix some bugs.Lance Stout
2011-02-24Updated the XEP-0085 plugin.Lance Stout
Can now be used as so: >>> msg['chat_state'] '' >>> msg <message /> >>> msg['chat_state'] = 'paused' >>> msg <message> <paused xmlns="http://jabber.org/protocol/chatstates" /> </message> >>> msg['chat_state'] 'paused' >>> del msg['chat_state'] >>> msg <message />
2011-02-14Merge branch 'develop' into stream_featuresLance Stout
Conflicts: sleekxmpp/xmlstream/stanzabase.py
2011-02-14Merge branch 'develop' into rosterLance Stout
Conflicts: sleekxmpp/clientxmpp.py
2011-02-11XMPPError exceptions can keep a stanza's contents.Lance Stout
This allows exceptions to include the original content of a stanza in the error response by including the parameter clear=False when raising the exception.
2011-02-08Update XEP-0060 test.Lance Stout
2011-02-07Fixed failing tests from new XEP-0009 pluginLance Stout
2011-02-05fixed mergeNathan Fritz
2011-02-02Merge branch 'develop' into rosterLance Stout
Conflicts: sleekxmpp/basexmpp.py
2011-01-27Update tostring methods.Lance Stout
Will now always show top-level namespace, unless it is the same as the stream's default namespace. Also added the XMPP stream namespace to the namespace map as 'stream'.
2011-01-19Fix tests for Nick stanza.Lance Stout
2011-01-13Introduced new XEP-0009 into develop.Dann Martens
2011-01-09Merge branch 'develop' into rosterLance Stout
2011-01-08Update the XEP-0092 plugin to the new style.Lance Stout
2011-01-08Add support for XEP-0059 to XEP-0030 plugin.Lance Stout
2011-01-08Added new XEP-0059 plugin.Lance Stout
Contributed by Erik Reuterborg Larsson (who).
2011-01-05Merge branch 'develop' into rosterLance Stout
2010-12-28Make the new XEP-30 plugin retain older API signatures.Lance Stout
2010-12-21Merge branch 'develop' into rosterLance Stout