summaryrefslogtreecommitdiff
path: root/tests/sleektest.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-10-06 18:46:23 -0400
committerLance Stout <lancestout@gmail.com>2010-10-06 18:46:23 -0400
commit88d21d210c15d76000b6a3c69e47a55b1582d054 (patch)
tree8d3a0b81e88980844da2a56efa90e26c701b3737 /tests/sleektest.py
parent799645f13fb0f8cfac5392594d992a7e951d2273 (diff)
downloadslixmpp-88d21d210c15d76000b6a3c69e47a55b1582d054.tar.gz
slixmpp-88d21d210c15d76000b6a3c69e47a55b1582d054.tar.bz2
slixmpp-88d21d210c15d76000b6a3c69e47a55b1582d054.tar.xz
slixmpp-88d21d210c15d76000b6a3c69e47a55b1582d054.zip
Corrected stream header tester.
Added test for testing stream headers.
Diffstat (limited to 'tests/sleektest.py')
-rw-r--r--tests/sleektest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/sleektest.py b/tests/sleektest.py
index e7951892..e08a8deb 100644
--- a/tests/sleektest.py
+++ b/tests/sleektest.py
@@ -378,7 +378,6 @@ class SleekTest(unittest.TestCase):
self.xmpp.socket.recvData(header)
self.xmpp.connect = lambda a=None, b=None, c=None, d=None: True
- self.xmpp.start_tls = lambda: True
self.xmpp.process(threaded=True)
if skip:
# Clear startup stanzas
@@ -420,6 +419,7 @@ class SleekTest(unittest.TestCase):
appended before the stream header.
"""
header = '<stream:stream %s>'
+ parts = []
if xml_header:
header = '<?xml version="1.0"?>' + header
if sto:
@@ -467,8 +467,8 @@ class SleekTest(unittest.TestCase):
# Apply closing elements so that we can construct
# XML objects for comparison.
- header2 += '</stream:stream>'
- sent_header2 += '</stream:stream>'
+ header2 = header + '</stream:stream>'
+ sent_header2 = sent_header + '</stream:stream>'
xml = ET.fromstring(header2)
sent_xml = ET.fromstring(sent_header2)