diff options
author | Lance Stout <lancestout@gmail.com> | 2010-11-05 14:45:58 -0400 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2010-11-05 21:18:48 -0400 |
commit | d0c506f93010f62cd447ce29f98ab991f521ec99 (patch) | |
tree | 80c994852cc04d4680c5db9c7e3abca77810e44e /tests/test_stanza_presence.py | |
parent | 7351fe1a0226298419e3d174d7b156daad91c131 (diff) | |
download | slixmpp-d0c506f93010f62cd447ce29f98ab991f521ec99.tar.gz slixmpp-d0c506f93010f62cd447ce29f98ab991f521ec99.tar.bz2 slixmpp-d0c506f93010f62cd447ce29f98ab991f521ec99.tar.xz slixmpp-d0c506f93010f62cd447ce29f98ab991f521ec99.zip |
Simplified SleekTest.
* 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.
Diffstat (limited to 'tests/test_stanza_presence.py')
-rw-r--r-- | tests/test_stanza_presence.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_stanza_presence.py b/tests/test_stanza_presence.py index 6a5a8b6e..8d043d5d 100644 --- a/tests/test_stanza_presence.py +++ b/tests/test_stanza_presence.py @@ -8,26 +8,26 @@ class TestPresenceStanzas(SleekTest): """Regression check presence['type'] = 'dnd' show value working""" p = self.Presence() p['type'] = 'dnd' - self.check_presence(p, "<presence><show>dnd</show></presence>") + self.check(p, "<presence><show>dnd</show></presence>") def testPresenceType(self): """Test manipulating presence['type']""" p = self.Presence() p['type'] = 'available' - self.check_presence(p, "<presence />") + self.check(p, "<presence />") self.failUnless(p['type'] == 'available', "Incorrect presence['type'] for type 'available': %s" % p['type']) for showtype in ['away', 'chat', 'dnd', 'xa']: p['type'] = showtype - self.check_presence(p, """ + self.check(p, """ <presence><show>%s</show></presence> """ % showtype) self.failUnless(p['type'] == showtype, "Incorrect presence['type'] for type '%s'" % showtype) p['type'] = None - self.check_presence(p, "<presence />") + self.check(p, "<presence />") def testPresenceUnsolicitedOffline(self): """ @@ -56,7 +56,7 @@ class TestPresenceStanzas(SleekTest): """Test presence/nick/nick stanza.""" p = self.Presence() p['nick']['nick'] = 'A nickname!' - self.check_presence(p, """ + self.check(p, """ <presence> <nick xmlns="http://jabber.org/nick/nick">A nickname!</nick> </presence> |