Added support for testind disconnect errors.

This commit is contained in:
Lance Stout
2011-05-27 11:01:30 -07:00
parent ec9aed5b75
commit 384e1a92b7
5 changed files with 55 additions and 2 deletions

View File

@@ -259,6 +259,13 @@ class SleekTest(unittest.TestCase):
# ------------------------------------------------------------------
# Methods for simulating stanza streams.
def stream_disconnect(self):
"""
Simulate a stream disconnection.
"""
if self.xmpp:
self.xmpp.socket.disconnect_error()
def stream_start(self, mode='client', skip=True, header=None,
socket='mock', jid='tester@localhost',
password='test', server='localhost',