From 7e829257676476536f8df37e392f210a9210a46f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 24 Mar 2014 19:52:46 +0000 Subject: Don't try to sync_dbus by talking to a Connection that just closed The ConnectionManager should still exist, so use that instead. --- tests/twisted/vcard/disconnect-during-pep.py | 5 ++++- tests/twisted/vcard/set-set-disconnect.py | 5 ++++- 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) -- cgit v1.2.3