Commit graph

12 commits

Author SHA1 Message Date
Lance Stout
22134c302b Updated SleekTest with docs and PEP8 style. 2010-08-12 01:25:42 -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
956fdf6970 Fix whitespace issues, and make some debugging statements clearer. 2010-08-03 18:32:19 -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
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
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
Nathan Fritz
85ee30539d more set/get Values changes 2010-07-19 16:26:25 -07:00
Nathan Fritz
f74baf1c23 updated sleektest to use new stanza get/set values api 2010-07-19 16:25:01 -07:00
Lance Stout
d5e42ac0e7 Condensed all of the stanzaPlugin functions into a single registerStanzaPlugin function.
Updated plugins and tests to use new function.
2010-07-19 13:58:53 -04:00
Lance Stout
35212c7991 Updated SleekTest to be able to simulate and test interactions with an XML stream. 2010-07-14 15:32:14 -04:00
Lance Stout
5c76d969f7 Added a new SleekTest class that provides useful methods for test cases.
Can now use: (where self is a SleekTest instance)
self.stanzaPlugin(stanza, plugin)
self.Message()  \
self.Iq()        > Just like basexmpp.Message(), etc.
self.Presence() /
self.checkMessage(msg, xmlstring)
self.checkIq(iq, xmlstring)
self.checkPresence(pres, xmlstring) <- Not implemented yet, but stub is there.

The check* methods also accept a use_values keyword argument that defaults to True.
When this value is True, an additional test is executed by creating a stanza using
getValues() and setValues(). Since some stanza objects can override these two methods,
disabling this test is sometimes required.
2010-06-27 17:33:43 -04:00