summaryrefslogtreecommitdiff
path: root/tests/test_iqstanzas.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/test_iqstanzas.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/test_iqstanzas.py')
-rw-r--r--tests/test_iqstanzas.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/test_iqstanzas.py b/tests/test_iqstanzas.py
index 98a01a26..2dabc5e9 100644
--- a/tests/test_iqstanzas.py
+++ b/tests/test_iqstanzas.py
@@ -4,10 +4,6 @@ from sleekxmpp.xmlstream.stanzabase import ET
class TestIqStanzas(SleekTest):
- def setUp(self):
- """Start XML stream for testing."""
- self.streamStart()
-
def tearDown(self):
"""Shutdown the XML stream after testing."""
self.streamClose()
@@ -32,6 +28,7 @@ class TestIqStanzas(SleekTest):
def testUnhandled(self):
"""Test behavior for Iq.unhandled."""
+ self.streamStart()
self.streamRecv("""
<iq id="test" type="get">
<query xmlns="test" />