[Telepathy-commits] [telepathy-gabble/master] accept-private-stream-tube: use create_from_si_offer

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon Mar 2 03:42:41 PST 2009


---
 tests/twisted/tubes/accept-private-stream-tube.py |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/tests/twisted/tubes/accept-private-stream-tube.py b/tests/twisted/tubes/accept-private-stream-tube.py
index afde3eb..4c76858 100644
--- a/tests/twisted/tubes/accept-private-stream-tube.py
+++ b/tests/twisted/tubes/accept-private-stream-tube.py
@@ -17,7 +17,7 @@ from twisted.words.xish import domish, xpath
 from twisted.internet import reactor
 import ns
 import constants as cs
-from bytestream import parse_si_offer
+from bytestream import create_from_si_offer
 import tubetestutil as t
 
 bob_jid = 'bob at localhost/Bob'
@@ -82,19 +82,16 @@ def expect_tube_activity(q, bus, conn, stream, bytestream_cls):
     protocol = event_socket.protocol
     protocol.sendData("hello initiator")
 
-    profile, sid, bytestreams = parse_si_offer(event_iq.stanza)
+    bytestream, profile = create_from_si_offer(stream, q, bytestream_cls, event_iq.stanza,
+        'test at localhost/Resource')
+
     assert profile == ns.TUBES
-    assert ns.IBB in bytestreams
-    assert ns.BYTESTREAMS in bytestreams
 
     stream_node = xpath.queryForNodes('/iq/si/stream[@xmlns="%s"]' %
         ns.TUBES, event_iq.stanza)[0]
     assert stream_node is not None
     assert stream_node['tube'] == str(stream_tube_id)
 
-    bytestream = bytestream_cls(stream, q, sid, 'test at localhost/Resource',
-        event_iq.stanza['to'], False)
-
     result, si = bytestream.create_si_reply(event_iq.stanza)
     si.addElement((ns.TUBES, 'tube'))
     stream.send(result)
-- 
1.5.6.5




More information about the telepathy-commits mailing list