XEP-0047: use coroutines for send(), sendall() and the new sendfile().

This commit is contained in:
Emmanuel Gil Peyrot
2015-04-14 19:19:46 +02:00
parent 058c530787
commit 4415d3be1a
2 changed files with 20 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
import asyncio
import threading
import time
@@ -78,6 +79,7 @@ class TestInBandByteStreams(SlixTest):
self.assertEqual(events, set(['ibb_stream_start', 'callback']))
@asyncio.coroutine
def testSendData(self):
"""Test sending data over an in-band bytestream."""
@@ -115,7 +117,7 @@ class TestInBandByteStreams(SlixTest):
# Test sending data out
stream.send("Testing")
yield from stream.send("Testing")
self.send("""
<iq type="set" id="2"