summaryrefslogtreecommitdiff
path: root/tests/sleektest.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-08-11 18:41:57 -0400
committerLance Stout <lancestout@gmail.com>2010-08-11 18:41:57 -0400
commit7a5ef2849218e122b04e244aeedd67844a0690b2 (patch)
treee28a3657fdb6c8755218b922ee882d2a4e26d6bb /tests/sleektest.py
parentc09e9c702c114f76d6cbfd9d7fb1a19cefa5a1e5 (diff)
downloadslixmpp-7a5ef2849218e122b04e244aeedd67844a0690b2.tar.gz
slixmpp-7a5ef2849218e122b04e244aeedd67844a0690b2.tar.bz2
slixmpp-7a5ef2849218e122b04e244aeedd67844a0690b2.tar.xz
slixmpp-7a5ef2849218e122b04e244aeedd67844a0690b2.zip
Updated SleekTest.streamClose to check that the stream was actually started before closing it.
Updated tests for Iq stanzas to not start a stream for every test; tests now run a lot faster. The call to streamClose must still be in the tearDown method to ensure it is called in the case of an error.
Diffstat (limited to 'tests/sleektest.py')
-rw-r--r--tests/sleektest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/sleektest.py b/tests/sleektest.py
index a7116544..0adab2b2 100644
--- a/tests/sleektest.py
+++ b/tests/sleektest.py
@@ -258,7 +258,7 @@ class SleekTest(unittest.TestCase):
self.checkPresence(data, sent, use_values)
def streamClose(self):
- if self.xmpp is not None:
+ if hasattr(self, 'xmpp') and self.xmpp is not None:
self.xmpp.disconnect()
self.xmpp.socket.recvData(self.xmpp.stream_footer)