summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-24 19:52:46 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-27 15:59:20 +0000
commit7e829257676476536f8df37e392f210a9210a46f (patch)
treeab2d3ee23e55dc4f835d9c9ea750b7b98eab43f9
parentf524437d8bee65a3d0e4e84d8d907ea56e23bca0 (diff)
Don't try to sync_dbus by talking to a Connection that just closed
The ConnectionManager should still exist, so use that instead.
-rw-r--r--tests/twisted/vcard/disconnect-during-pep.py5
-rw-r--r--tests/twisted/vcard/set-set-disconnect.py5
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/twisted/vcard/disconnect-during-pep.py b/tests/twisted/vcard/disconnect-during-pep.py
index 38f7d002a..2e009f4df 100644
--- a/tests/twisted/vcard/disconnect-during-pep.py
+++ b/tests/twisted/vcard/disconnect-during-pep.py
@@ -10,6 +10,9 @@ from gabbletest import (exec_test, make_result_iq, acknowledge_iq,
import constants as cs
def test(q, bus, conn, stream):
+ cm = bus.get_object(cs.CM + '.gabble',
+ '/' + cs.CM.replace('.', '/') + '/gabble')
+
event = q.expect('stream-iq', to=None, query_ns='vcard-temp',
query_name='vCard')
@@ -31,7 +34,7 @@ def test(q, bus, conn, stream):
# was no longer there, *crash*.
# check that Gabble hasn't crashed
- sync_dbus(bus, q, conn)
+ sync_dbus(bus, q, cm)
if __name__ == '__main__':
exec_test(test)
diff --git a/tests/twisted/vcard/set-set-disconnect.py b/tests/twisted/vcard/set-set-disconnect.py
index e35ee9744..6f5a54eab 100644
--- a/tests/twisted/vcard/set-set-disconnect.py
+++ b/tests/twisted/vcard/set-set-disconnect.py
@@ -8,6 +8,9 @@ from gabbletest import exec_test, acknowledge_iq, expect_and_handle_get_vcard, s
import constants as cs
def test(q, bus, conn, stream):
+ cm = bus.get_object(cs.CM + '.gabble',
+ '/' + cs.CM.replace('.', '/') + '/gabble')
+
expect_and_handle_get_vcard(q, stream)
sync_stream(q, stream)
@@ -23,7 +26,7 @@ def test(q, bus, conn, stream):
q.expect('dbus-error', method='SetAvatar', name=cs.NOT_AVAILABLE)
q.expect('dbus-error', method='SetAvatar', name=cs.NOT_AVAILABLE)
- sync_dbus(bus, q, conn)
+ sync_dbus(bus, q, cm)
if __name__ == '__main__':
exec_test(test)