Commit Graph

330 Commits

Author SHA1 Message Date
Lance Stout 0fffbb8200 Unit test reorganization.
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
2010-10-07 10:58:13 -04:00
Lance Stout 75a051556f Changed SleekTest to use underscored names. 2010-10-07 09:22:27 -04:00
Lance Stout 88d21d210c Corrected stream header tester.
Added test for testing stream headers.
2010-10-06 18:46:23 -04:00
Lance Stout f234dc02cf Updated SleekTest and related tests.
May now use a component for stream testing.
Methods provided for testing stream headers.
2010-10-06 18:10:04 -04:00
Lance Stout 9f0baec7b2 Made first pass at cleaning BaseXMPP.
Have not intregrated the new JID class yet.
2010-10-01 23:56:46 -04:00
Lance Stout 9a34c9a9a1 Modified event handling to use the event queue.
Updated tests to match. (Needed to add a small wait to make sure
the event got through the queue before checking the results.)
2010-10-01 13:49:58 -04:00
Lance Stout 3749c1b88c Fixed ElementBase.match to match using sub_interface elements. 2010-08-30 17:12:10 -04:00
Lance Stout 9c62bce206 Updated ElementBase.match to respect namespaces with slashes.
Required adding option to _fix_ns to not propagate namespaces to child elements.
2010-08-30 14:55:30 -04:00
Lance Stout 89fb15e896 Updated the suite of handler classes with documentation.
Updated XMLStream to return True or False from removeHandler to indicate if the handler
existed and was removed.

Waiter handlers now unregister themselves after timing out.
2010-08-27 16:42:26 -04:00
Lance Stout 906aa0bd68 Fixed SleekTest compare method to check XML text.
Corrected resulting test failures. All pass again.
2010-08-27 15:48:48 -04:00
Lance Stout bb6f4af8e2 Added unit tests for StanzaBase. 2010-08-27 12:22:35 -04:00
Lance Stout 37ff17b0cb Added unit test for _fix_ns for handling namespaces with forward slashes. 2010-08-26 18:27:18 -04:00
Lance Stout d68bc2ba07 Finished the update of ElementBase with docs and unit tests.
Corrected bugs in equality comparisons between stanzas.
2010-08-26 13:49:36 -04:00
Lance Stout a3580dcef9 Fixed ElementBase.match to respect namespaces. 2010-08-25 14:54:09 -04:00
Lance Stout 1eaa9cb28c Updated ElementBase.match and added unit tests. 2010-08-25 14:40:16 -04:00
Lance Stout 5d458bf6c2 Updated ElementBase._delSub and added unit tests.
_delSub can now accept a path and will optionally remove any empty parent elements after deleting the target elements.
2010-08-25 10:52:07 -04:00
Lance Stout c8f406d1b3 Updated ElementBase._setSubText and added unit tests.
_setSubText can now handle elements specified by an XPath expression, and
will build up the element tree as needed, reusing an existing elements in
the path.
2010-08-24 09:37:42 -04:00
Lance Stout 203986dd7c Updated ElementBase._getSubText and added unit tests.
Also added ElementBase._fix_ns() to apply the stanza namespace to elements that don't have a namespace.
2010-08-24 08:55:37 -04:00
fritzy f4ecf0bac4 fixed a but in stanza_pubsub 2010-08-22 06:08:48 +00:00
Lance Stout 8a0616b3e0 Updated ElementBase methods _getAttr, _setAttr, and _delAttr with docs and tests. 2010-08-19 20:41:26 -04:00
Lance Stout fac3bca1f6 Updated ElementBase.__delitem__ and added unit tests. 2010-08-19 19:11:12 -04:00
Lance Stout e4240dd593 Updated ElementBase.__setitem__ and added unit tests. 2010-08-19 14:21:58 -04:00
Lance Stout 2f6f4fc16d Updated ElementBase.__getitem__ with docs and unit tests. 2010-08-13 21:33:11 -04:00
Lance Stout fe49b8c377 Updated getStanzaValues and setStanzaValues with docs and unit tests. 2010-08-13 20:05:24 -04:00
Lance Stout c20fab0f6c Updated ElementBase.setup, and added unit tests. 2010-08-13 12:24:47 -04:00
Lance Stout c721fb4126 Added a generic checkStanza method to SleekTest. Updated the other check methods to use it. 2010-08-13 12:23:34 -04:00
Lance Stout 5da7bd1866 Removed unused xmlcompare.py. 2010-08-12 01:26:01 -04:00
Lance Stout 22134c302b Updated SleekTest with docs and PEP8 style. 2010-08-12 01:25:42 -04:00
Lance Stout b40a489796 Updated roster stanza with docs and PEP8 style. 2010-08-11 23:32:14 -04:00
Lance Stout 7a5ef28492 Updated SleekTest.streamClose to check that the stream was actually started before closing it.
Updated tests for Iq stanzas to not start a stream for every test; tests now run a lot faster.
The call to streamClose must still be in the tearDown method to ensure it is called in the
case of an error.
2010-08-11 18:41:57 -04:00
Lance Stout 48ba7292bc Updated SleekTest to use the new tostring function instead of ET.tostring 2010-08-06 12:04:52 -04:00
Lance Stout 0d0c044a68 Add unit tests for the tostring function. 2010-08-05 20:57:55 -04:00
Lance Stout 58f77d898f Updated tests to use a relative import for SleekTest to please Python3.
Fixed some tabs/spaces issues.
2010-08-05 20:23:07 -04:00
Lance Stout fec69be731 Update nick stanza with documentation and PEP8 style. 2010-08-03 18:32:53 -04:00
Lance Stout 956fdf6970 Fix whitespace issues, and make some debugging statements clearer. 2010-08-03 18:32:19 -04:00
Lance Stout 183a3f1b87 Updated XHTML-IM stanza with documentation and PEP8 style. 2010-08-03 17:58:18 -04:00
Lance Stout 41ab2b8460 Updated presence stanza with documentation and PEP8 style. 2010-08-03 17:30:34 -04:00
Lance Stout 939ae298c2 Updated message stanzas and tests with documentation and PEP8 style. 2010-08-03 12:26:36 -04:00
Lance Stout cbed8029ba Updated, cleaned, and documented Iq stanza class. Also added unit tests. 2010-07-29 23:58:25 -04:00
Lance Stout 1da3e5b35e Added unit tests for error stanzas. Corrected error in deleting conditions. 2010-07-29 23:55:13 -04:00
Lance Stout a96a046e27 Remove extra debugging lines and speed up stream testing in SleekTest. 2010-07-29 23:15:49 -04:00
Lance Stout aad185fe29 Update test to reflect change in reply() method that removes the from attribute. 2010-07-26 21:38:23 -04:00
Nathan Fritz 2cb82afc2c updated and moved jid class -- jids now have setters 2010-07-26 18:13:09 -07:00
Lance Stout 5c9b47afbd Update test_events to use SleekTest to make everything consistent. 2010-07-20 12:22:25 -04:00
Lance Stout 7ad0143687 Updated pubsub stanzas to use xep_0004 stanza objects, and updated tests to match. 2010-07-20 12:18:38 -04:00
Lance Stout de24e9ed45 Lots of XEP-0004 bug fixes.
Forms have default type of 'form'
setFields now uses a list of tuples instead of a dictionary because ordering is important.
getFields defaults to returning a list of tuples, but the use_dict parameter can change that
2010-07-20 12:16:57 -04:00
Lance Stout 690eaf8d3c Updated license notices to use the correct MIT format. Also corrected references to nonexistant license.txt to LICENSE. 2010-07-20 11:19:49 -04:00
Lance Stout f505e229d6 Updated message stanza tests. 2010-07-20 01:56:18 -04:00
Lance Stout bb927c7e6a Updated presence stanza to include a 'show' interface. Presence stanza tests updated accordingly. 2010-07-20 00:04:34 -04:00
Lance Stout 14f1c3ba51 Updated SleekTest to implement the checkPresence method.
Also, removed unnecessary TestStream class and shortened timeout during stream connection.
2010-07-19 23:58:33 -04:00