diff options
author | Lance Stout <lance@dingus.local> | 2011-05-27 11:01:30 -0700 |
---|---|---|
committer | Lance Stout <lance@dingus.local> | 2011-05-27 11:01:30 -0700 |
commit | 384e1a92b716250c168f5dedc1f9693111f81423 (patch) | |
tree | 431d0e7718f365a93ce01e5922e71c2d050bcac0 /sleekxmpp/test/livesocket.py | |
parent | ec9aed5b751cac187b774794c7d8ca9de298838a (diff) | |
download | slixmpp-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/livesocket.py')
-rw-r--r-- | sleekxmpp/test/livesocket.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sleekxmpp/test/livesocket.py b/sleekxmpp/test/livesocket.py index 3e0f2135..7dd4693c 100644 --- a/sleekxmpp/test/livesocket.py +++ b/sleekxmpp/test/livesocket.py @@ -58,6 +58,18 @@ class TestLiveSocket(object): # ------------------------------------------------------------------ # Testing Interface + def disconnect_errror(self): + """ + Used to simulate a socket disconnection error. + + Not used by live sockets. + """ + try: + self.socket.shutdown() + self.socket.close() + except: + pass + def next_sent(self, timeout=None): """ Get the next stanza that has been sent. |