diff options
author | Lance Stout <lancestout@gmail.com> | 2011-05-31 10:59:14 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-05-31 10:59:14 -0700 |
commit | 5ed27bf5f65f03e14da24a60e261a175074cb7aa (patch) | |
tree | c79db47352f003b51459016df699032b51712292 /sleekxmpp/test/sleektest.py | |
parent | 62bdaab7c7fc5a35c83ac9f3b0bf5b393f0eb925 (diff) | |
parent | a81162edd2434756e21d7f9a79d71d770a43db7b (diff) | |
download | slixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.tar.gz slixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.tar.bz2 slixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.tar.xz slixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.zip |
Merge branch 'develop' into roster
Diffstat (limited to 'sleekxmpp/test/sleektest.py')
-rw-r--r-- | sleekxmpp/test/sleektest.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sleekxmpp/test/sleektest.py b/sleekxmpp/test/sleektest.py index 92f467fc..19309fc5 100644 --- a/sleekxmpp/test/sleektest.py +++ b/sleekxmpp/test/sleektest.py @@ -285,6 +285,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', @@ -353,6 +360,8 @@ class SleekTest(unittest.TestCase): self.xmpp.process(threaded=True) if skip: if socket != 'live': + # Mark send queue as usable + self.xmpp.session_started_event.set() # Clear startup stanzas self.xmpp.socket.next_sent(timeout=1) if mode == 'component': |