diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-05-18 11:10:27 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-05-18 19:24:39 +0100 |
commit | 7209f3901a41ea0abacfb201aeef90a7abb0e76a (patch) | |
tree | e9ed1bf2d70393db8a325cdd9e7da76601d41e56 | |
parent | 3f771dceff1cfd03f21f3cc44eb326f3299d2270 (diff) | |
download | telepathy-mission-control-7209f3901a41ea0abacfb201aeef90a7abb0e76a.tar.gz |
tests: when creating multiple simulated connections use different object paths
This was causing test failures when testing using a better tp-glib.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r-- | tests/twisted/account-manager/reconnect.py | 7 | ||||
-rw-r--r-- | tests/twisted/account-manager/recover-from-disconnect.py | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/twisted/account-manager/reconnect.py b/tests/twisted/account-manager/reconnect.py index 0c6ea3ad..16a19ba7 100644 --- a/tests/twisted/account-manager/reconnect.py +++ b/tests/twisted/account-manager/reconnect.py @@ -162,7 +162,12 @@ def test(q, bus, mc): path=tp_path_prefix + '/ConnectionManager/fakecm', interface=tp_name_prefix + '.ConnectionManager', handled=False) - conn = SimulatedConnection(q, bus, 'fakecm', 'fakeprotocol', '_', + # The object path needs to be different from the first simulated + # connection which we made above, because the object isn't removed + # from this bus and it's actually hard to do so because it's not + # really on a bus, it's on the queue. So let's just change the + # object path and it's fine. + conn = SimulatedConnection(q, bus, 'fakecm', 'fakeprotocol', 'second', 'myself') q.dbus_return(e.message, conn.bus_name, conn.object_path, signature='so') diff --git a/tests/twisted/account-manager/recover-from-disconnect.py b/tests/twisted/account-manager/recover-from-disconnect.py index aba60598..c2fa491f 100644 --- a/tests/twisted/account-manager/recover-from-disconnect.py +++ b/tests/twisted/account-manager/recover-from-disconnect.py @@ -132,7 +132,12 @@ def test(q, bus, mc): assertEquals(cs.CONN_STATUS_REASON_REQUESTED, connecting.args[0].get('ConnectionStatusReason')) - conn = SimulatedConnection(q, bus, 'fakecm', 'fakeprotocol', '_', + # The object path needs to be different from the first simulated + # connection which we made above, because the object isn't removed + # from this bus and it's actually hard to do so because it's not + # really on a bus, it's on the queue. So let's just change the + # object path and it's fine. + conn = SimulatedConnection(q, bus, 'fakecm', 'fakeprotocol', 'second', 'myself', has_presence=True) q.dbus_return(e.message, conn.bus_name, conn.object_path, signature='so') |