summaryrefslogtreecommitdiff
path: root/tests/twisted/sidecars.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/twisted/sidecars.py')
-rw-r--r--tests/twisted/sidecars.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/twisted/sidecars.py b/tests/twisted/sidecars.py
index 61b863dee..00b8c56af 100644
--- a/tests/twisted/sidecars.py
+++ b/tests/twisted/sidecars.py
@@ -18,7 +18,7 @@ if not PLUGINS_ENABLED:
def test(q, bus, conn, stream):
# Request a sidecar thate we support before we're connected; it should just
# wait around until we're connected.
- call_async(q, conn.Future, 'EnsureSidecar', TEST_PLUGIN_IFACE)
+ call_async(q, conn.Sidecars1, 'EnsureSidecar', TEST_PLUGIN_IFACE)
if PLUGINS_ENABLED:
# Now we're connected, the call we made earlier should return.
@@ -28,30 +28,30 @@ def test(q, bus, conn, stream):
assertEquals({}, props)
# We should get the same sidecar if we request it again
- path2, props2 = conn.Future.EnsureSidecar(TEST_PLUGIN_IFACE)
+ path2, props2 = conn.Sidecars1.EnsureSidecar(TEST_PLUGIN_IFACE)
assertEquals((path, props), (path2, props2))
else:
# Only now does it fail.
q.expect('dbus-error', method='EnsureSidecar')
# This is not a valid interface name
- call_async(q, conn.Future, 'EnsureSidecar', 'not an interface')
+ call_async(q, conn.Sidecars1, 'EnsureSidecar', 'not an interface')
q.expect('dbus-error', name=cs.INVALID_ARGUMENT)
# The test plugin makes no reference to this interface.
- call_async(q, conn.Future, 'EnsureSidecar', 'unsupported.sidecar')
+ call_async(q, conn.Sidecars1, 'EnsureSidecar', 'unsupported.sidecar')
q.expect('dbus-error', name=cs.NOT_IMPLEMENTED)
if PLUGINS_ENABLED:
# This sidecar does have some properties:
- path, props = conn.Future.EnsureSidecar(TEST_PLUGIN_IFACE + ".Props")
+ path, props = conn.Sidecars1.EnsureSidecar(TEST_PLUGIN_IFACE + ".Props")
assertContains(TEST_PLUGIN_IFACE + ".Props.Greeting", props)
# The plugin claims it implements this sidecar, but actually doesn't.
# Check that we don't blow up (although this is no different from
# Gabble's perspective to creating a sidecar failing because a network
# service wasn't there, for instance).
- call_async(q, conn.Future, 'EnsureSidecar',
+ call_async(q, conn.Sidecars1, 'EnsureSidecar',
TEST_PLUGIN_IFACE + ".Buggy")
q.expect('dbus-error', name=cs.NOT_IMPLEMENTED)
@@ -59,7 +59,7 @@ def test(q, bus, conn, stream):
# created.
pattern = EventPattern('stream-iq', to='sidecar.example.com',
query_ns='http://example.com/sidecar')
- call_async(q, conn.Future, 'EnsureSidecar', TEST_PLUGIN_IFACE + ".IQ")
+ call_async(q, conn.Sidecars1, 'EnsureSidecar', TEST_PLUGIN_IFACE + ".IQ")
e = q.expect_many(pattern)[0]
sync_dbus(bus, q, conn)
@@ -70,7 +70,7 @@ def test(q, bus, conn, stream):
# Let's try again. The plugin should get a chance to ping the server
# again.
- call_async(q, conn.Future, 'EnsureSidecar', TEST_PLUGIN_IFACE + ".IQ")
+ call_async(q, conn.Sidecars1, 'EnsureSidecar', TEST_PLUGIN_IFACE + ".IQ")
e = q.expect_many(pattern)[0]
# The server said yes, so we should get a sidecar back!
@@ -80,7 +80,7 @@ def test(q, bus, conn, stream):
# If we ask again once the plugin has been created, it should return at
# once without any more network traffic.
q.forbid_events([pattern])
- conn.Future.EnsureSidecar(TEST_PLUGIN_IFACE + ".IQ")
+ conn.Sidecars1.EnsureSidecar(TEST_PLUGIN_IFACE + ".IQ")
sync_stream(q, stream)
# TODO: test ensuring a sidecar that waits for something from the
@@ -96,7 +96,7 @@ def test(q, bus, conn, stream):
EventPattern('stream-closed'),
)
- call_async(q, conn.Future, 'EnsureSidecar', 'zomg.what')
+ call_async(q, conn.Sidecars1, 'EnsureSidecar', 'zomg.what')
# With older telepathy-glib this would be DISCONNECTED;
# with newer telepathy-glib the Connection disappears from the bus
# sooner, and you get UnknownMethod or something from dbus-glib.