summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoe Hildebrand <joe-github@cursive.net>2012-10-31 12:49:33 -0600
committerJoe Hildebrand <joe-github@cursive.net>2012-10-31 12:49:33 -0600
commit48def71d0c35755d0d34f3be4ebc35a26c12693b (patch)
treed26b36700616356c5668c32d0a5db29f885c0239 /tests
parentc8c20fff71c31cfcaee9cda44b4cfddfd0763cc2 (diff)
parent12e8bb6ddcd686ec9835ba478a112984e65120a1 (diff)
downloadslixmpp-48def71d0c35755d0d34f3be4ebc35a26c12693b.tar.gz
slixmpp-48def71d0c35755d0d34f3be4ebc35a26c12693b.tar.bz2
slixmpp-48def71d0c35755d0d34f3be4ebc35a26c12693b.tar.xz
slixmpp-48def71d0c35755d0d34f3be4ebc35a26c12693b.zip
Merge branch 'master' of git://github.com/fritzy/SleekXMPP into develophildjj-dev
# By Lance Stout # Via Lance Stout * 'master' of git://github.com/fritzy/SleekXMPP: Turns out not all data is UTF-8, so don't try to decode it.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_stream_xep_0047.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/test_stream_xep_0047.py b/tests/test_stream_xep_0047.py
index d8cdd6a3..8c46606e 100644
--- a/tests/test_stream_xep_0047.py
+++ b/tests/test_stream_xep_0047.py
@@ -5,7 +5,7 @@ from sleekxmpp.test import *
class TestInBandByteStreams(SleekTest):
-
+
def setUp(self):
self.stream_start(plugins=['xep_0047', 'xep_0030'])
@@ -13,7 +13,7 @@ class TestInBandByteStreams(SleekTest):
self.stream_close()
def testOpenStream(self):
- """Test requesting a stream, successfully"""
+ """Test requesting a stream, successfully"""
events = []
@@ -22,7 +22,7 @@ class TestInBandByteStreams(SleekTest):
self.xmpp.add_event_handler('ibb_stream_start', on_stream_start)
-
+
t = threading.Thread(name='open_stream',
target=self.xmpp['xep_0047'].open_stream,
args=('tester@localhost/receiver',),
@@ -31,7 +31,7 @@ class TestInBandByteStreams(SleekTest):
self.send("""
<iq type="set" to="tester@localhost/receiver" id="1">
- <open xmlns="http://jabber.org/protocol/ibb"
+ <open xmlns="http://jabber.org/protocol/ibb"
sid="testing"
block-size="4096"
stanza="iq" />
@@ -62,18 +62,18 @@ class TestInBandByteStreams(SleekTest):
events.add('callback')
self.xmpp.add_event_handler('ibb_stream_start', on_stream_start)
-
+
t = threading.Thread(name='open_stream',
target=self.xmpp['xep_0047'].open_stream,
args=('tester@localhost/receiver',),
- kwargs={'sid': 'testing',
+ kwargs={'sid': 'testing',
'block': False,
'callback': stream_callback})
t.start()
self.send("""
<iq type="set" to="tester@localhost/receiver" id="1">
- <open xmlns="http://jabber.org/protocol/ibb"
+ <open xmlns="http://jabber.org/protocol/ibb"
sid="testing"
block-size="4096"
stanza="iq" />
@@ -106,7 +106,7 @@ class TestInBandByteStreams(SleekTest):
self.xmpp.add_event_handler('ibb_stream_start', on_stream_start)
self.xmpp.add_event_handler('ibb_stream_data', on_stream_data)
-
+
t = threading.Thread(name='open_stream',
target=self.xmpp['xep_0047'].open_stream,
args=('tester@localhost/receiver',),
@@ -115,7 +115,7 @@ class TestInBandByteStreams(SleekTest):
self.send("""
<iq type="set" to="tester@localhost/receiver" id="1">
- <open xmlns="http://jabber.org/protocol/ibb"
+ <open xmlns="http://jabber.org/protocol/ibb"
sid="testing"
block-size="4096"
stanza="iq" />
@@ -142,8 +142,8 @@ class TestInBandByteStreams(SleekTest):
<iq type="set" id="2"
from="tester@localhost"
to="tester@localhost/receiver">
- <data xmlns="http://jabber.org/protocol/ibb"
- seq="0"
+ <data xmlns="http://jabber.org/protocol/ibb"
+ seq="0"
sid="testing">
VGVzdGluZw==
</data>
@@ -161,8 +161,8 @@ class TestInBandByteStreams(SleekTest):
<iq type="set" id="A"
to="tester@localhost"
from="tester@localhost/receiver">
- <data xmlns="http://jabber.org/protocol/ibb"
- seq="0"
+ <data xmlns="http://jabber.org/protocol/ibb"
+ seq="0"
sid="testing">
aXQgd29ya3Mh
</data>
@@ -174,7 +174,7 @@ class TestInBandByteStreams(SleekTest):
to="tester@localhost/receiver" />
""")
- self.assertEqual(data, ['it works!'])
+ self.assertEqual(data, [b'it works!'])
suite = unittest.TestLoader().loadTestsFromTestCase(TestInBandByteStreams)