[telepathy-gabble/master] offer-no-caps.py: use create_server
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Wed Apr 29 10:43:30 PDT 2009
---
tests/twisted/tubes/offer-no-caps.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/twisted/tubes/offer-no-caps.py b/tests/twisted/tubes/offer-no-caps.py
index 3a63775..7ee6de5 100644
--- a/tests/twisted/tubes/offer-no-caps.py
+++ b/tests/twisted/tubes/offer-no-caps.py
@@ -23,8 +23,6 @@ def props(ct, extra=None):
return ret
def test(q, bus, conn, stream):
- echo_path = t.set_up_echo("")
-
conn.Connect()
_, vcard_event, roster_event = q.expect_many(
@@ -81,8 +79,10 @@ def test(q, bus, conn, stream):
e = q.expect('dbus-error', method='OfferDBusTube').error
assert e.get_dbus_name() == cs.NOT_AVAILABLE, e.get_dbus_name()
+ address = t.create_server(q, cs.SOCKET_ADDRESS_TYPE_UNIX)
+
call_async(q, tubes, 'OfferStreamTube', 'echo', {},
- cs.SOCKET_ADDRESS_TYPE_UNIX, dbus.ByteArray(echo_path),
+ cs.SOCKET_ADDRESS_TYPE_UNIX, address,
cs.SOCKET_ACCESS_CONTROL_LOCALHOST, "")
e = q.expect('dbus-error', method='OfferStreamTube').error
assert e.get_dbus_name() == cs.NOT_AVAILABLE, e.get_dbus_name()
@@ -95,7 +95,7 @@ def test(q, bus, conn, stream):
st_chan = bus.get_object(conn.bus_name, st_path)
st = dbus.Interface(st_chan, cs.CHANNEL_TYPE_STREAM_TUBE)
call_async(q, st, 'Offer', cs.SOCKET_ADDRESS_TYPE_UNIX,
- dbus.ByteArray(echo_path), cs.SOCKET_ACCESS_CONTROL_LOCALHOST, "", {})
+ address, cs.SOCKET_ACCESS_CONTROL_LOCALHOST, "", {})
e = q.expect('dbus-error', method='Offer').error
assert e.get_dbus_name() == cs.NOT_AVAILABLE, e.get_dbus_name()
--
1.5.6.5
More information about the telepathy-commits
mailing list