summaryrefslogtreecommitdiff
path: root/sleekxmpp/test/sleektest.py
diff options
context:
space:
mode:
authorLance Stout <lance@dingus.local>2011-05-27 11:01:30 -0700
committerLance Stout <lance@dingus.local>2011-05-27 11:01:30 -0700
commit384e1a92b716250c168f5dedc1f9693111f81423 (patch)
tree431d0e7718f365a93ce01e5922e71c2d050bcac0 /sleekxmpp/test/sleektest.py
parentec9aed5b751cac187b774794c7d8ca9de298838a (diff)
downloadslixmpp-384e1a92b716250c168f5dedc1f9693111f81423.tar.gz
slixmpp-384e1a92b716250c168f5dedc1f9693111f81423.tar.bz2
slixmpp-384e1a92b716250c168f5dedc1f9693111f81423.tar.xz
slixmpp-384e1a92b716250c168f5dedc1f9693111f81423.zip
Added support for testind disconnect errors.
Diffstat (limited to 'sleekxmpp/test/sleektest.py')
-rw-r--r--sleekxmpp/test/sleektest.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/sleekxmpp/test/sleektest.py b/sleekxmpp/test/sleektest.py
index 24af1e7a..8cf7b70d 100644
--- a/sleekxmpp/test/sleektest.py
+++ b/sleekxmpp/test/sleektest.py
@@ -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',