Commit graph

18 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
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
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
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