[telepathy-gabble/master] offer-private-stream-tube.py: block the transport until we check the access control

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Thu May 7 07:49:39 PDT 2009


---
 tests/twisted/tubes/offer-private-stream-tube.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/tubes/offer-private-stream-tube.py b/tests/twisted/tubes/offer-private-stream-tube.py
index 8ab15cd..035d997 100644
--- a/tests/twisted/tubes/offer-private-stream-tube.py
+++ b/tests/twisted/tubes/offer-private-stream-tube.py
@@ -41,8 +41,8 @@ def contact_offer_dbus_tube(bytestream, tube_id):
 
 def test(q, bus, conn, stream, bytestream_cls,
         address_type, access_control, access_control_param):
-    address1 = t.set_up_echo(q, address_type)
-    address2 = t.set_up_echo(q, address_type)
+    address1 = t.set_up_echo(q, address_type, True)
+    address2 = t.set_up_echo(q, address_type, True)
 
     t.check_conn_properties(q, conn)
 
@@ -343,6 +343,9 @@ def test(q, bus, conn, stream, bytestream_cls,
     handle, access = new_conn_event.args
     assert handle == bob_handle
     protocol = socket_event.protocol
+
+    # start to read from the transport so we can read the control byte
+    protocol.transport.startReading()
     t.check_new_connection_access(q, access_control, access, protocol)
 
     expected_tube = (stream_tube_id, self_handle, cs.TUBE_TYPE_STREAM, 'echo',
@@ -375,6 +378,9 @@ def test(q, bus, conn, stream, bytestream_cls,
     handle, access = new_conn_event.args
     assert handle == bob_handle
     protocol = socket_event.protocol
+
+    # start to read from the transport so we can read the control byte
+    protocol.transport.startReading()
     t.check_new_connection_access(q, access_control, access, protocol)
 
     expected_tube = (new_stream_tube_id, self_handle, cs.TUBE_TYPE_STREAM,
-- 
1.5.6.5




More information about the telepathy-commits mailing list