[telepathy-gabble/master] Remove Disconnect() call from tests

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Tue Jul 14 02:07:58 PDT 2009


The connection is disconnected at the end of each test in gabbletest.py
so there is no point to do it in the test itself.
---
 tests/twisted/avatar-requirements.py               |    4 ----
 tests/twisted/caps/from-bare-jid.py                |    2 --
 tests/twisted/connect/test-success.py              |    3 ---
 .../twisted/file-transfer/file_transfer_helper.py  |    3 +--
 .../file-transfer/test-caps-file-transfer.py       |    5 -----
 .../test-receive-file-and-disconnect.py            |    2 --
 tests/twisted/jingle/call-state.py                 |    4 ----
 tests/twisted/jingle/google-relay.py               |    3 ---
 tests/twisted/jingle/hold-audio.py                 |    4 ----
 tests/twisted/jingle/hold-av.py                    |    7 -------
 tests/twisted/jingle/incoming-basics.py            |    4 ----
 tests/twisted/jingle/misuse.py                     |    3 ---
 tests/twisted/jingle/outgoing-basics.py            |    3 ---
 tests/twisted/jingle/outgoing-ensure.py            |    4 ----
 tests/twisted/jingle/outgoing-many-streams.py      |    8 --------
 tests/twisted/jingle/outgoing-not-answered.py      |    3 ---
 tests/twisted/jingle/payload-types.py              |    9 ---------
 tests/twisted/jingle/stream-handler-error.py       |    3 ---
 tests/twisted/jingle/stun-server.py                |    7 -------
 .../twisted/jingle/test-content-adding-removal.py  |    5 -----
 tests/twisted/jingle/test-content-complex.py       |    7 -------
 tests/twisted/jingle/test-description-info.py      |    3 ---
 tests/twisted/jingle/test-incoming-call-reject.py  |    7 -------
 tests/twisted/jingle/test-incoming-iceudp.py       |    5 -----
 .../twisted/jingle/test-outgoing-call-rejected.py  |    3 ---
 tests/twisted/jingle/test-outgoing-iceudp.py       |    3 ---
 tests/twisted/jingle/test-wait-for-caps.py         |    3 ---
 tests/twisted/muc/name-conflict.py                 |    4 ----
 tests/twisted/muc/renamed.py                       |    4 ----
 tests/twisted/muc/send-error.py                    |    8 --------
 tests/twisted/muc/test-ensure.py                   |    6 ------
 tests/twisted/muc/test-muc-alias.py                |    5 -----
 tests/twisted/muc/test-muc-invitation.py           |    4 ----
 tests/twisted/muc/test-muc-ownership.py            |    5 -----
 tests/twisted/muc/test-muc-properties.py           |    4 ----
 tests/twisted/muc/test-muc.py                      |    7 -------
 tests/twisted/olpc/olpc-muc-invitation.py          |    4 ----
 tests/twisted/olpc/olpc-muc-prop-change.py         |    4 ----
 tests/twisted/olpc/test-olpc-set-props-preload.py  |    1 -
 tests/twisted/presence/presence.py                 |    4 ----
 tests/twisted/roster/groups-12791.py               |    4 ----
 tests/twisted/roster/groups.py                     |    4 ----
 tests/twisted/roster/removed-from-rp-subscribe.py  |    3 ---
 tests/twisted/roster/test-roster-item-deletion.py  |    4 ----
 tests/twisted/roster/test-roster-subscribe.py      |    5 -----
 tests/twisted/roster/test-roster.py                |    4 ----
 tests/twisted/roster/test-save-alias-to-roster.py  |    5 -----
 tests/twisted/test-capabilities.py                 |    3 ---
 tests/twisted/test-caps-cache.py                   |    5 -----
 tests/twisted/test-caps-hash.py                    |    5 -----
 tests/twisted/test-caps-tubes.py                   |    5 -----
 tests/twisted/test-debug.py                        |    3 ---
 tests/twisted/test-disco.py                        |    4 ----
 tests/twisted/test-fallback-socks5-proxy.py        |    4 ----
 tests/twisted/test-location.py                     |    5 -----
 tests/twisted/test-register.py                     |    3 ---
 tests/twisted/test-set-status-idempotence.py       |    3 ---
 tests/twisted/text/destroy.py                      |    4 ----
 tests/twisted/text/ensure.py                       |    4 ----
 tests/twisted/text/initiate-requestotron.py        |    4 ----
 tests/twisted/text/initiate.py                     |    4 ----
 tests/twisted/text/respawn.py                      |    4 ----
 tests/twisted/text/send-error.py                   |    4 ----
 tests/twisted/text/test-chat-state.py              |    4 ----
 tests/twisted/text/test-text-delayed.py            |    5 -----
 tests/twisted/text/test-text-no-body.py            |    3 ---
 tests/twisted/text/test-text.py                    |    5 -----
 tests/twisted/tubes/accept-muc-dbus-tube.py        |    4 ----
 tests/twisted/tubes/accept-private-dbus-tube.py    |    5 -----
 tests/twisted/tubes/accept-private-stream-tube.py  |    5 -----
 tests/twisted/tubes/close-muc-with-closed-tube.py  |    4 ----
 tests/twisted/tubes/crash-on-list-channels.py      |    3 ---
 .../twisted/tubes/create-invalid-tube-channels.py  |    4 ----
 tests/twisted/tubes/ensure-si-tube.py              |    4 ----
 tests/twisted/tubes/muc-presence.py                |    5 -----
 tests/twisted/tubes/offer-muc-dbus-tube.py         |    5 -----
 tests/twisted/tubes/offer-muc-stream-tube.py       |    5 -----
 tests/twisted/tubes/offer-no-caps.py               |    2 --
 tests/twisted/tubes/offer-private-dbus-tube.py     |    4 ----
 tests/twisted/tubes/offer-private-stream-tube.py   |    5 -----
 tests/twisted/tubes/test-get-available-tubes.py    |    6 ------
 tests/twisted/tubes/test-socks5-muc.py             |    5 -----
 tests/twisted/vcard/test-alias-empty-vcard.py      |    4 ----
 tests/twisted/vcard/test-alias-pep.py              |    5 -----
 tests/twisted/vcard/test-alias.py                  |    4 ----
 tests/twisted/vcard/test-avatar-async.py           |    4 ----
 tests/twisted/vcard/test-avatar-tokens.py          |    4 ----
 tests/twisted/vcard/test-avatar.py                 |    4 ----
 tests/twisted/vcard/test-save-alias-to-vcard.py    |    4 ----
 tests/twisted/vcard/test-set-alias.py              |    4 ----
 tests/twisted/vcard/test-vcard-cache.py            |    4 ----
 tests/twisted/vcard/test-vcard-race.py             |    3 ---
 tests/twisted/vcard/update-rejected.py             |    2 --
 93 files changed, 1 insertions(+), 394 deletions(-)

diff --git a/tests/twisted/avatar-requirements.py b/tests/twisted/avatar-requirements.py
index 21e9a8b..1c6ded6 100644
--- a/tests/twisted/avatar-requirements.py
+++ b/tests/twisted/avatar-requirements.py
@@ -39,9 +39,5 @@ def test(q, bus, conn, stream):
     assert maxh == 96, maxh
     assert maxb == 8192, maxb
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/caps/from-bare-jid.py b/tests/twisted/caps/from-bare-jid.py
index 8e86c9a..5664650 100644
--- a/tests/twisted/caps/from-bare-jid.py
+++ b/tests/twisted/caps/from-bare-jid.py
@@ -106,7 +106,5 @@ def test(q, bus, conn, stream):
     e = q.expect('dbus-signal', signal='CapabilitiesChanged')
     assertContains(streamed_media_caps, e.args[0])
 
-    conn.Disconnect()
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/connect/test-success.py b/tests/twisted/connect/test-success.py
index be379f4..a8608af 100644
--- a/tests/twisted/connect/test-success.py
+++ b/tests/twisted/connect/test-success.py
@@ -13,9 +13,6 @@ def test(q, bus, conn, stream):
     q.expect('dbus-signal', signal='PresenceUpdate',
         args=[{1L: (0L, {u'available': {}})}])
     q.expect('dbus-signal', signal='StatusChanged', args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED])
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[cs.CONN_STATUS_DISCONNECTED, cs.CSR_REQUESTED])
-    return True
 
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/file-transfer/file_transfer_helper.py b/tests/twisted/file-transfer/file_transfer_helper.py
index 630d6a7..7c87a70 100644
--- a/tests/twisted/file-transfer/file_transfer_helper.py
+++ b/tests/twisted/file-transfer/file_transfer_helper.py
@@ -116,8 +116,7 @@ class FileTransferTest(object):
         self.q.expect('dbus-signal', signal='Closed')
 
     def done(self):
-        self.conn.Disconnect()
-        self.q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
+        pass
 
     def test(self, q, bus, conn, stream):
         self.q = q
diff --git a/tests/twisted/file-transfer/test-caps-file-transfer.py b/tests/twisted/file-transfer/test-caps-file-transfer.py
index 9c7fad3..312c334 100644
--- a/tests/twisted/file-transfer/test-caps-file-transfer.py
+++ b/tests/twisted/file-transfer/test-caps-file-transfer.py
@@ -130,10 +130,5 @@ def test(q, bus, conn, stream):
 
     test_ft_caps_to_contact(q, bus, conn, stream)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/file-transfer/test-receive-file-and-disconnect.py b/tests/twisted/file-transfer/test-receive-file-and-disconnect.py
index 3ff24ad..ce2987e 100644
--- a/tests/twisted/file-transfer/test-receive-file-and-disconnect.py
+++ b/tests/twisted/file-transfer/test-receive-file-and-disconnect.py
@@ -7,8 +7,6 @@ class ReceiveFileAndDisconnectTest(ReceiveFileTest):
         s.connect(self.address)
 
         # disconnect
-        self.conn.Disconnect()
-        self.q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
         return True
 
 if __name__ == '__main__':
diff --git a/tests/twisted/jingle/call-state.py b/tests/twisted/jingle/call-state.py
index 4f4c5a0..994c040 100644
--- a/tests/twisted/jingle/call-state.py
+++ b/tests/twisted/jingle/call-state.py
@@ -281,9 +281,5 @@ def test(jp, q, bus, conn, stream):
     chan.Group.RemoveMembers([self_handle], 'closed')
     e = q.expect('dbus-signal', signal='Close') #XXX - match against the path
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     test_all_dialects(test)
-
diff --git a/tests/twisted/jingle/google-relay.py b/tests/twisted/jingle/google-relay.py
index ec1a950..1d00531 100644
--- a/tests/twisted/jingle/google-relay.py
+++ b/tests/twisted/jingle/google-relay.py
@@ -293,9 +293,6 @@ def test(q, bus, conn, stream, incoming=True, too_slow=None):
 
     # Tests completed, close the connection
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 def test_too_slow(q, bus, conn, stream, httpd, media_chan, too_slow):
     """
     Regression test for a bug where if the channel was closed before the HTTP
diff --git a/tests/twisted/jingle/hold-audio.py b/tests/twisted/jingle/hold-audio.py
index 7b550e1..05f472d 100644
--- a/tests/twisted/jingle/hold-audio.py
+++ b/tests/twisted/jingle/hold-audio.py
@@ -415,9 +415,5 @@ def test(jp, q, bus, conn, stream):
 
     e = q.expect('dbus-signal', signal='Close') #XXX - match against the path
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     test_all_dialects(test)
-
diff --git a/tests/twisted/jingle/hold-av.py b/tests/twisted/jingle/hold-av.py
index 02021b0..44db6d1 100644
--- a/tests/twisted/jingle/hold-av.py
+++ b/tests/twisted/jingle/hold-av.py
@@ -476,12 +476,5 @@ def test(jp, q, bus, conn, stream):
 
     e = q.expect('dbus-signal', signal='Close') #XXX - match against the path
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-    return True
-
-
 if __name__ == '__main__':
     test_all_dialects(test)
-
diff --git a/tests/twisted/jingle/incoming-basics.py b/tests/twisted/jingle/incoming-basics.py
index 054b653..d477779 100644
--- a/tests/twisted/jingle/incoming-basics.py
+++ b/tests/twisted/jingle/incoming-basics.py
@@ -180,9 +180,5 @@ def test(jp, q, bus, conn, stream):
     jt.terminate()
     q.expect('dbus-signal', signal='Closed', path=path[len(tp_path_prefix):])
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     test_all_dialects(test)
-
diff --git a/tests/twisted/jingle/misuse.py b/tests/twisted/jingle/misuse.py
index 05913aa..ed40b24 100644
--- a/tests/twisted/jingle/misuse.py
+++ b/tests/twisted/jingle/misuse.py
@@ -42,8 +42,5 @@ def test(q, bus, conn, stream):
     except DBusException, e:
         assertEquals(cs.NOT_AVAILABLE, e.get_dbus_name())
 
-    conn.Disconnect()
-
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/jingle/outgoing-basics.py b/tests/twisted/jingle/outgoing-basics.py
index 61a5676..ddf280d 100644
--- a/tests/twisted/jingle/outgoing-basics.py
+++ b/tests/twisted/jingle/outgoing-basics.py
@@ -253,9 +253,6 @@ def worker(jp, q, bus, conn, stream, variant):
     # Check that we're the actor
     assertEquals(self_handle, mc_event.args[5])
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 def rccs(q, bus, conn, stream):
     """
     Tests that the connection's RequestableChannelClasses for StreamedMedia are
diff --git a/tests/twisted/jingle/outgoing-ensure.py b/tests/twisted/jingle/outgoing-ensure.py
index 9a330f0..ca5360a 100644
--- a/tests/twisted/jingle/outgoing-ensure.py
+++ b/tests/twisted/jingle/outgoing-ensure.py
@@ -141,9 +141,5 @@ def test(q, bus, conn, stream):
 
     chan.Close()
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/jingle/outgoing-many-streams.py b/tests/twisted/jingle/outgoing-many-streams.py
index 93e8b5d..4cbe763 100644
--- a/tests/twisted/jingle/outgoing-many-streams.py
+++ b/tests/twisted/jingle/outgoing-many-streams.py
@@ -226,13 +226,5 @@ def test(q, bus, conn, stream):
         *(closes + removeds)
     )
 
-    # Test completed, close the connection.
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-    return True
-
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/jingle/outgoing-not-answered.py b/tests/twisted/jingle/outgoing-not-answered.py
index 8503332..4bd3b49 100644
--- a/tests/twisted/jingle/outgoing-not-answered.py
+++ b/tests/twisted/jingle/outgoing-not-answered.py
@@ -65,8 +65,5 @@ def test(jp, q, bus, conn, stream):
         assert xpath.queryForNodes("/jingle/reason/timeout", jingle) is not None, \
             jingle.toXml()
 
-    conn.Disconnect()
-
-
 if __name__ == '__main__':
     test_all_dialects(test)
diff --git a/tests/twisted/jingle/payload-types.py b/tests/twisted/jingle/payload-types.py
index 43b8aaf..a4f7937 100644
--- a/tests/twisted/jingle/payload-types.py
+++ b/tests/twisted/jingle/payload-types.py
@@ -131,14 +131,5 @@ def test(q, bus, conn, stream):
         assert len(parameters) == 1, parameters
         assert parameters['misc'] == 'other', parameters
 
-    # Test completed, close the connection
-
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-    return True
-
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/jingle/stream-handler-error.py b/tests/twisted/jingle/stream-handler-error.py
index e25a2b2..c8f5f06 100644
--- a/tests/twisted/jingle/stream-handler-error.py
+++ b/tests/twisted/jingle/stream-handler-error.py
@@ -55,9 +55,6 @@ def test(q, bus, conn, stream, call_error_on):
     # Gabble doesn't fall over, and the channel closes nicely.
     e = q.expect('dbus-signal', signal='Closed', path=media_chan_suffix)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(partial(test, call_error_on='stream'))
     exec_test(partial(test, call_error_on='session'))
diff --git a/tests/twisted/jingle/stun-server.py b/tests/twisted/jingle/stun-server.py
index 2ac0532..e421620 100644
--- a/tests/twisted/jingle/stun-server.py
+++ b/tests/twisted/jingle/stun-server.py
@@ -175,13 +175,6 @@ def test(q, bus, conn, stream,
                     e.query['action'] == 'session-terminate'),
             EventPattern('dbus-signal', signal='Closed'),
             )
-    # Tests completed, close the connection
-
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-    return True
-
 
 if __name__ == '__main__':
     exec_test(lambda q, b, c, s: test(q, b, c, s,
diff --git a/tests/twisted/jingle/test-content-adding-removal.py b/tests/twisted/jingle/test-content-adding-removal.py
index ca2aa61..ab95374 100644
--- a/tests/twisted/jingle/test-content-adding-removal.py
+++ b/tests/twisted/jingle/test-content-adding-removal.py
@@ -154,11 +154,6 @@ def test(jp, q, bus, conn, stream, peer_removes_final_content):
     # The peer can ack the terminate too, just for completeness.
     stream.send(make_result_iq(stream, st.stanza))
 
-    # Test completed, close the connection
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-
 if __name__ == '__main__':
     test_dialects(gabble_terminates, [JingleProtocol015, JingleProtocol031])
     test_dialects(peer_terminates, [JingleProtocol015, JingleProtocol031])
diff --git a/tests/twisted/jingle/test-content-complex.py b/tests/twisted/jingle/test-content-complex.py
index b65c5f0..6b760c3 100644
--- a/tests/twisted/jingle/test-content-complex.py
+++ b/tests/twisted/jingle/test-content-complex.py
@@ -249,12 +249,5 @@ def worker(jp, q, bus, conn, stream):
         xpath.queryForNodes("/iq/jingle[@action='session-terminate']",
             x.stanza))
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-    return True
-
-
 if __name__ == '__main__':
     test_dialects(worker, [JingleProtocol015, JingleProtocol031])
-
diff --git a/tests/twisted/jingle/test-description-info.py b/tests/twisted/jingle/test-description-info.py
index 3a0703f..ba30a68 100644
--- a/tests/twisted/jingle/test-description-info.py
+++ b/tests/twisted/jingle/test-description-info.py
@@ -198,9 +198,6 @@ def test(q, bus, conn, stream, send_early_description_info=False):
         xpath.queryForNodes("/iq/jingle[@action='session-terminate']",
             x.stanza))
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
     exec_test(early_description_info)
diff --git a/tests/twisted/jingle/test-incoming-call-reject.py b/tests/twisted/jingle/test-incoming-call-reject.py
index 77879f4..ff301a1 100644
--- a/tests/twisted/jingle/test-incoming-call-reject.py
+++ b/tests/twisted/jingle/test-incoming-call-reject.py
@@ -101,13 +101,6 @@ def test(jp, q, bus, conn, stream, busy):
             r = "/jingle/reason/cancel"
         assert xpath.queryForNodes(r, jingle) is not None, (jingle.toXml(), r)
 
-    # Tests completed, close the connection
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-    return True
-
-
 if __name__ == '__main__':
     test_all_dialects(test_busy)
     test_all_dialects(test_no_reason)
diff --git a/tests/twisted/jingle/test-incoming-iceudp.py b/tests/twisted/jingle/test-incoming-iceudp.py
index cee48f5..7cd2c5d 100644
--- a/tests/twisted/jingle/test-incoming-iceudp.py
+++ b/tests/twisted/jingle/test-incoming-iceudp.py
@@ -90,13 +90,8 @@ def worker(jp, q, bus, conn, stream):
 
     e = q.expect('dbus-signal', signal='Close')
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-
 def test031(q, bus, conn, stream):
     return worker(JingleProtocol031(),q, bus, conn, stream)
 
 if __name__ == '__main__':
     exec_test(test031)
-
diff --git a/tests/twisted/jingle/test-outgoing-call-rejected.py b/tests/twisted/jingle/test-outgoing-call-rejected.py
index b5593e4..2541423 100644
--- a/tests/twisted/jingle/test-outgoing-call-rejected.py
+++ b/tests/twisted/jingle/test-outgoing-call-rejected.py
@@ -60,8 +60,5 @@ def test(jp, q, bus, conn, stream):
 
     q.expect('dbus-signal', signal='Close') #XXX - match against the path
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     test_all_dialects(test)
diff --git a/tests/twisted/jingle/test-outgoing-iceudp.py b/tests/twisted/jingle/test-outgoing-iceudp.py
index 32b975f..70d9a05 100644
--- a/tests/twisted/jingle/test-outgoing-iceudp.py
+++ b/tests/twisted/jingle/test-outgoing-iceudp.py
@@ -99,9 +99,6 @@ def worker(jp, q, bus, conn, stream):
     e = q.expect('stream-iq',
         predicate=jp.action_predicate('session-terminate'))
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 def test031(q, bus, conn, stream):
     return worker(JingleProtocol031(),q, bus, conn, stream)
 
diff --git a/tests/twisted/jingle/test-wait-for-caps.py b/tests/twisted/jingle/test-wait-for-caps.py
index cd59539..2b32add 100644
--- a/tests/twisted/jingle/test-wait-for-caps.py
+++ b/tests/twisted/jingle/test-wait-for-caps.py
@@ -31,9 +31,6 @@ def test(q, bus, conn, stream):
     run_test(q, bus, conn, stream, jt, True)
     run_test(q, bus, conn, stream, jt2, False)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 def run_test(q, bus, conn, stream, jt, request_before_presence):
     """
     Requests streams on a media channel to jt.remote_jid, either before their
diff --git a/tests/twisted/muc/name-conflict.py b/tests/twisted/muc/name-conflict.py
index c333222..cc087a4 100644
--- a/tests/twisted/muc/name-conflict.py
+++ b/tests/twisted/muc/name-conflict.py
@@ -25,10 +25,6 @@ def test(q, bus, conn, stream):
     test_join(q, bus, conn, stream, 'chat at conf.localhost', False)
     test_join(q, bus, conn, stream, 'chien at conf.localhost', True)
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 def test_join(q, bus, conn, stream, room_jid, transient_conflict):
     """
     Tells Gabble to join a MUC, but make the first nick it tries conflict with
diff --git a/tests/twisted/muc/renamed.py b/tests/twisted/muc/renamed.py
index 6f30664..8bdab0a 100644
--- a/tests/twisted/muc/renamed.py
+++ b/tests/twisted/muc/renamed.py
@@ -81,9 +81,5 @@ def test(q, bus, conn, stream):
         (handle_owners, toofer, handle_owners[toofer], self_handle)
     assert handle_owners[liz] == 0, (handle_owners, liz)
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/muc/send-error.py b/tests/twisted/muc/send-error.py
index 11670f0..2df0902 100644
--- a/tests/twisted/muc/send-error.py
+++ b/tests/twisted/muc/send-error.py
@@ -100,13 +100,5 @@ def test(q, bus, conn, stream):
             assert key in echo[i], (i, key, echo)
             assert echo[i][key] == greeting[i][key], (i, key, echo, greeting)
 
-
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-    return True
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/muc/test-ensure.py b/tests/twisted/muc/test-ensure.py
index 6e55659..23e03f9 100644
--- a/tests/twisted/muc/test-ensure.py
+++ b/tests/twisted/muc/test-ensure.py
@@ -32,12 +32,6 @@ def test(q, bus, conn, stream):
     test_create_ensure(q, conn, bus, stream, jids[0], room_handles[0])
     test_ensure_ensure(q, conn, bus, stream, jids[1], room_handles[1])
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-    return True
-
 def test_create_ensure(q, conn, bus, stream, room_jid, room_handle):
     # Call both Create and Ensure for the same channel.
     call_async(q, conn.Requests, 'CreateChannel',
diff --git a/tests/twisted/muc/test-muc-alias.py b/tests/twisted/muc/test-muc-alias.py
index d6b19c6..e3b8789 100644
--- a/tests/twisted/muc/test-muc-alias.py
+++ b/tests/twisted/muc/test-muc-alias.py
@@ -47,10 +47,5 @@ def test(q, bus, conn, stream):
 
     event = q.expect('dbus-return', method='RequestChannel')
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/muc/test-muc-invitation.py b/tests/twisted/muc/test-muc-invitation.py
index 476c7cf..1d347e7 100644
--- a/tests/twisted/muc/test-muc-invitation.py
+++ b/tests/twisted/muc/test-muc-invitation.py
@@ -119,9 +119,5 @@ def test(q, bus, conn, stream):
     assert (reasons is not None and len(reasons) == 1), repr(reasons)
     assert str(reasons[0]) == 'I want to test invitations'
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/muc/test-muc-ownership.py b/tests/twisted/muc/test-muc-ownership.py
index 9b8b6ad..4181f32 100644
--- a/tests/twisted/muc/test-muc-ownership.py
+++ b/tests/twisted/muc/test-muc-ownership.py
@@ -100,10 +100,5 @@ def test(q, bus, conn, stream):
     assert all[u'HandleOwners'] == { 2: 1, 3: 0, 4: 0, 5: 6, 7: 8 }, all
     assert (all[u'GroupFlags'] & 2048) == 2048, all.get('GroupFlags')
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/muc/test-muc-properties.py b/tests/twisted/muc/test-muc-properties.py
index 755e654..8c68695 100644
--- a/tests/twisted/muc/test-muc-properties.py
+++ b/tests/twisted/muc/test-muc-properties.py
@@ -88,9 +88,5 @@ def test(q, bus, conn, stream):
 
     q.expect('dbus-return', method='SetProperties', value=())
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/muc/test-muc.py b/tests/twisted/muc/test-muc.py
index 8d30857..2c7cca1 100644
--- a/tests/twisted/muc/test-muc.py
+++ b/tests/twisted/muc/test-muc.py
@@ -257,12 +257,5 @@ def test(q, bus, conn, stream):
     assertLength(1, status)
     assertEquals(status[0].children[0], u'booo')
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-    return True
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/olpc/olpc-muc-invitation.py b/tests/twisted/olpc/olpc-muc-invitation.py
index 8836e1d..014206a 100644
--- a/tests/twisted/olpc/olpc-muc-invitation.py
+++ b/tests/twisted/olpc/olpc-muc-invitation.py
@@ -233,9 +233,5 @@ def test(q, bus, conn, stream):
     assert chat_handle == handles['chat']
     assert props == {'color': '#f00baa,#f00baa', 'private' : True}
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/olpc/olpc-muc-prop-change.py b/tests/twisted/olpc/olpc-muc-prop-change.py
index 1cf3471..793224a 100644
--- a/tests/twisted/olpc/olpc-muc-prop-change.py
+++ b/tests/twisted/olpc/olpc-muc-prop-change.py
@@ -396,9 +396,5 @@ def test(q, bus, conn, stream):
     properties = xpath.queryForNodes('/activities/properties', activities[0])
     assert properties is None, repr(properties)
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/olpc/test-olpc-set-props-preload.py b/tests/twisted/olpc/test-olpc-set-props-preload.py
index 318558b..5f696c0 100644
--- a/tests/twisted/olpc/test-olpc-set-props-preload.py
+++ b/tests/twisted/olpc/test-olpc-set-props-preload.py
@@ -50,7 +50,6 @@ def test(q, bus, conn, stream):
 
     iq['type'] = 'result'
     stream.send(iq)
-    conn.Disconnect()
 
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/presence/presence.py b/tests/twisted/presence/presence.py
index 0235be9..5789fb8 100644
--- a/tests/twisted/presence/presence.py
+++ b/tests/twisted/presence/presence.py
@@ -46,9 +46,5 @@ def test(q, bus, conn, stream):
     event = q.expect('dbus-signal', signal='PresencesChanged')
     assert event.args[0] == { amy_handle: (2, 'chat', 'I may have been drinking') }
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/roster/groups-12791.py b/tests/twisted/roster/groups-12791.py
index a143a6d..f028b96 100644
--- a/tests/twisted/roster/groups-12791.py
+++ b/tests/twisted/roster/groups-12791.py
@@ -75,9 +75,5 @@ def test(q, bus, conn, stream):
     _expect_group_channel(q, bus, conn, 'affected-by-fdo-12791', [])
     _expect_group_channel(q, bus, conn, 'men', ['bob at foo.com', 'che at foo.com'])
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/roster/groups.py b/tests/twisted/roster/groups.py
index d614f38..e6cb214 100644
--- a/tests/twisted/roster/groups.py
+++ b/tests/twisted/roster/groups.py
@@ -44,9 +44,5 @@ def test(q, bus, conn, stream):
     expect_group_channel(q, bus, conn, 'women', ['amy at foo.com'])
     expect_group_channel(q, bus, conn, 'men', ['bob at foo.com', 'che at foo.com'])
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/roster/removed-from-rp-subscribe.py b/tests/twisted/roster/removed-from-rp-subscribe.py
index 56d3f46..7d44591 100644
--- a/tests/twisted/roster/removed-from-rp-subscribe.py
+++ b/tests/twisted/roster/removed-from-rp-subscribe.py
@@ -93,8 +93,5 @@ def test(q, bus, conn, stream):
             path=stored.object_path[len(tp_path_prefix):]),
         )
 
-    # Arrivederci!
-    conn.Disconnect()
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/roster/test-roster-item-deletion.py b/tests/twisted/roster/test-roster-item-deletion.py
index 32420ff..bf4c4d2 100644
--- a/tests/twisted/roster/test-roster-item-deletion.py
+++ b/tests/twisted/roster/test-roster-item-deletion.py
@@ -43,9 +43,5 @@ def test(q, bus, conn, stream):
 
     acknowledge_iq(stream, q.expect('stream-iq').stanza)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/roster/test-roster-subscribe.py b/tests/twisted/roster/test-roster-subscribe.py
index 44a1f49..3b4400f 100644
--- a/tests/twisted/roster/test-roster-subscribe.py
+++ b/tests/twisted/roster/test-roster-subscribe.py
@@ -58,10 +58,5 @@ def test(q, bus, conn, stream):
             EventPattern('stream-presence'),
             )
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/roster/test-roster.py b/tests/twisted/roster/test-roster.py
index d464c08..b7c4da4 100644
--- a/tests/twisted/roster/test-roster.py
+++ b/tests/twisted/roster/test-roster.py
@@ -38,9 +38,5 @@ def test(q, bus, conn, stream):
     expect_list_channel(q, bus, conn, 'stored',
         ['amy at foo.com', 'bob at foo.com', 'che at foo.com'])
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/roster/test-save-alias-to-roster.py b/tests/twisted/roster/test-save-alias-to-roster.py
index 5a7bf3b..dc08e5a 100644
--- a/tests/twisted/roster/test-save-alias-to-roster.py
+++ b/tests/twisted/roster/test-save-alias-to-roster.py
@@ -69,10 +69,5 @@ def test(q, bus, conn, stream):
     assert item['jid'] == 'bob at foo.com'
     assert item['name'] == 'Bobby'
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/test-capabilities.py b/tests/twisted/test-capabilities.py
index 3bea957..fa372c1 100644
--- a/tests/twisted/test-capabilities.py
+++ b/tests/twisted/test-capabilities.py
@@ -120,9 +120,6 @@ def test(q, bus, conn, stream):
     else:
         assert False, "Should have had an error!"
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
 
diff --git a/tests/twisted/test-caps-cache.py b/tests/twisted/test-caps-cache.py
index 9ef32de..ca469bc 100644
--- a/tests/twisted/test-caps-cache.py
+++ b/tests/twisted/test-caps-cache.py
@@ -141,10 +141,5 @@ def test(q, bus, conn, stream):
     _test_with_hash(q, bus, conn, stream, 'bilbo3 at foo.com/Foo', client,
         False)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/test-caps-hash.py b/tests/twisted/test-caps-hash.py
index 2a85371..9c2bfee 100644
--- a/tests/twisted/test-caps-hash.py
+++ b/tests/twisted/test-caps-hash.py
@@ -297,10 +297,5 @@ def test(q, bus, conn, stream):
             'user4 at example.com/Res', 6L, 7L,
             'http://telepathy.freedesktop.org/fake-client4', 1)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/test-caps-tubes.py b/tests/twisted/test-caps-tubes.py
index 35f310b..a97f2a3 100644
--- a/tests/twisted/test-caps-tubes.py
+++ b/tests/twisted/test-caps-tubes.py
@@ -338,10 +338,5 @@ def test(q, bus, conn, stream):
 
     test_tube_caps_to_contact(q, bus, conn, stream)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/test-debug.py b/tests/twisted/test-debug.py
index a11b8c6..ba39ab8 100644
--- a/tests/twisted/test-debug.py
+++ b/tests/twisted/test-debug.py
@@ -47,9 +47,6 @@ def test(q, bus, conn, stream):
     props_iface.Set(iface, 'Enabled', False)
     snapshot = list(messages)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
     assert snapshot == messages
 
 if __name__ == '__main__':
diff --git a/tests/twisted/test-disco.py b/tests/twisted/test-disco.py
index 099f254..c9a1dee 100644
--- a/tests/twisted/test-disco.py
+++ b/tests/twisted/test-disco.py
@@ -22,9 +22,5 @@ def test(q, bus, conn, stream):
     elem = event.stanza
     assert elem['id'] == '1'
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/test-fallback-socks5-proxy.py b/tests/twisted/test-fallback-socks5-proxy.py
index 130e707..e3357a8 100644
--- a/tests/twisted/test-fallback-socks5-proxy.py
+++ b/tests/twisted/test-fallback-socks5-proxy.py
@@ -77,10 +77,6 @@ def test(q, bus, conn, stream):
             assert node['port'] == proxy_port.pop(node['jid'])
     assert proxy_port == {}
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-    return True
-
 if __name__ == '__main__':
     exec_test(test, params={'fallback-socks5-proxies':
         ['fallback1-proxy.localhost', 'fallback2-proxy.localhost']})
diff --git a/tests/twisted/test-location.py b/tests/twisted/test-location.py
index 5dbdfca..38e92fb 100644
--- a/tests/twisted/test-location.py
+++ b/tests/twisted/test-location.py
@@ -129,10 +129,5 @@ def test(q, bus, conn, stream):
 
     q.expect('dbus-return', method='GetLocations')
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-    return True
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/test-register.py b/tests/twisted/test-register.py
index 1e59f43..ab2efcf 100644
--- a/tests/twisted/test-register.py
+++ b/tests/twisted/test-register.py
@@ -38,9 +38,6 @@ def test_success(q, bus, conn, stream):
 
     q.expect('dbus-signal', signal='StatusChanged',
         args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED])
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged',
-        args=[cs.CONN_STATUS_DISCONNECTED, cs.CSR_REQUESTED])
 
 def test_conflict(q, bus, conn, stream):
     iq = connect_and_send_form(q, conn, stream)
diff --git a/tests/twisted/test-set-status-idempotence.py b/tests/twisted/test-set-status-idempotence.py
index 5f33223..3e3bba5 100644
--- a/tests/twisted/test-set-status-idempotence.py
+++ b/tests/twisted/test-set-status-idempotence.py
@@ -99,9 +99,6 @@ def run_test(q, bus, conn, stream, set_status_func):
         'org.freedesktop.Telepathy.Connection/contact-id':
             'test at localhost'}}
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test_simple_presence)
     exec_test(test_presence)
diff --git a/tests/twisted/text/destroy.py b/tests/twisted/text/destroy.py
index 01ede8a..3f947aa 100644
--- a/tests/twisted/text/destroy.py
+++ b/tests/twisted/text/destroy.py
@@ -120,9 +120,5 @@ def test(q, bus, conn, stream):
     else:
         raise AssertionError("Why won't it die?")
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/text/ensure.py b/tests/twisted/text/ensure.py
index 590018f..8ada280 100644
--- a/tests/twisted/text/ensure.py
+++ b/tests/twisted/text/ensure.py
@@ -33,10 +33,6 @@ def test(q, bus, conn, stream):
     test_ensure_ensure(q, conn, self_handle, jids[0], handles[0])
     test_request_ensure(q, conn, self_handle, jids[1], handles[1])
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
-
 def test_ensure_ensure(q, conn, self_handle, jid, handle):
     """
     Test ensuring a non-existant channel twice.  The first call should succeed
diff --git a/tests/twisted/text/initiate-requestotron.py b/tests/twisted/text/initiate-requestotron.py
index c24f1a8..f7d32b0 100644
--- a/tests/twisted/text/initiate-requestotron.py
+++ b/tests/twisted/text/initiate-requestotron.py
@@ -67,9 +67,5 @@ def test(q, bus, conn, stream):
     assert new_sig.args[0][0] in properties['Channels'], \
             (new_sig.args[0][0], properties['Channels'])
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/text/initiate.py b/tests/twisted/text/initiate.py
index 9554b6d..5875e61 100644
--- a/tests/twisted/text/initiate.py
+++ b/tests/twisted/text/initiate.py
@@ -88,9 +88,5 @@ def test(q, bus, conn, stream):
     # body
     assert event.args[5] == 'hello'
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/text/respawn.py b/tests/twisted/text/respawn.py
index a1fd16e..db9f1ed 100644
--- a/tests/twisted/text/respawn.py
+++ b/tests/twisted/text/respawn.py
@@ -167,9 +167,5 @@ def test(q, bus, conn, stream):
     else:
         raise AssertionError("Why won't it die?")
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/text/send-error.py b/tests/twisted/text/send-error.py
index 9ecc31b..b15d5ad 100644
--- a/tests/twisted/text/send-error.py
+++ b/tests/twisted/text/send-error.py
@@ -179,9 +179,5 @@ def test(q, bus, conn, stream):
     test_temporary_error(q, bus, conn, stream)
     test_permanent_error(q, bus, conn, stream)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/text/test-chat-state.py b/tests/twisted/text/test-chat-state.py
index 51d382a..b8688b1 100644
--- a/tests/twisted/text/test-chat-state.py
+++ b/tests/twisted/text/test-chat-state.py
@@ -156,9 +156,5 @@ def test(q, bus, conn, stream):
     chan.Close()
     sync_stream(q, stream)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/text/test-text-delayed.py b/tests/twisted/text/test-text-delayed.py
index 1a2266c..807b01b 100644
--- a/tests/twisted/text/test-text-delayed.py
+++ b/tests/twisted/text/test-text-delayed.py
@@ -51,10 +51,5 @@ def test(q, bus, conn, stream):
 
     assert message[1]['content'] == 'hello', message
 
-
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/text/test-text-no-body.py b/tests/twisted/text/test-text-no-body.py
index 67847ac..89b4786 100644
--- a/tests/twisted/text/test-text-no-body.py
+++ b/tests/twisted/text/test-text-no-body.py
@@ -34,9 +34,6 @@ def test(q, bus, conn, stream):
     assert event.args[1] == cs.CHANNEL_TYPE_TEXT
     jid = conn.InspectHandles(cs.HT_CONTACT, [event.args[3]])[0]
     assert jid == 'bob at foo.com'
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
 
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/text/test-text.py b/tests/twisted/text/test-text.py
index c4cfaea..828902e 100644
--- a/tests/twisted/text/test-text.py
+++ b/tests/twisted/text/test-text.py
@@ -166,10 +166,5 @@ def test(q, bus, conn, stream):
     assert sent.args[1] == 0, sent.args # message type normal
     assert sent.args[2] == u'goodbye', sent.args
 
-
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/tubes/accept-muc-dbus-tube.py b/tests/twisted/tubes/accept-muc-dbus-tube.py
index 4eb61a7..77226ca 100644
--- a/tests/twisted/tubes/accept-muc-dbus-tube.py
+++ b/tests/twisted/tubes/accept-muc-dbus-tube.py
@@ -106,10 +106,6 @@ def test(q, bus, conn, stream, access_control):
         EventPattern('dbus-signal', signal='Closed'),
         EventPattern('dbus-signal', signal='ChannelClosed'))
 
-    # OK, we're done
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     # We can't use t.exec_dbus_tube_test() as we can use only the muc bytestream
     exec_test(lambda q, bus, conn, stream:
diff --git a/tests/twisted/tubes/accept-private-dbus-tube.py b/tests/twisted/tubes/accept-private-dbus-tube.py
index 1c2913f..35fed9a 100644
--- a/tests/twisted/tubes/accept-private-dbus-tube.py
+++ b/tests/twisted/tubes/accept-private-dbus-tube.py
@@ -197,10 +197,5 @@ def test(q, bus, conn, stream, bytestream_cls, access_control):
         EventPattern('dbus-signal', signal='Closed'),
         EventPattern('dbus-signal', signal='ChannelClosed'))
 
-    # OK, we're done
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     t.exec_dbus_tube_test(test)
diff --git a/tests/twisted/tubes/accept-private-stream-tube.py b/tests/twisted/tubes/accept-private-stream-tube.py
index 199565a..f5682e5 100644
--- a/tests/twisted/tubes/accept-private-stream-tube.py
+++ b/tests/twisted/tubes/accept-private-stream-tube.py
@@ -291,10 +291,5 @@ def test(q, bus, conn, stream, bytestream_cls,
         EventPattern('dbus-signal', signal='Closed'),
         EventPattern('dbus-signal', signal='ChannelClosed'))
 
-    # OK, we're done
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     t.exec_stream_tube_test(test)
diff --git a/tests/twisted/tubes/close-muc-with-closed-tube.py b/tests/twisted/tubes/close-muc-with-closed-tube.py
index cc8a7c3..86c8ae6 100644
--- a/tests/twisted/tubes/close-muc-with-closed-tube.py
+++ b/tests/twisted/tubes/close-muc-with-closed-tube.py
@@ -136,9 +136,5 @@ def test(q, bus, conn, stream):
     # close the text channel
     text_chan.Close()
 
-    # OK, we're done
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/tubes/crash-on-list-channels.py b/tests/twisted/tubes/crash-on-list-channels.py
index 6a2ae1f..3198d9d 100644
--- a/tests/twisted/tubes/crash-on-list-channels.py
+++ b/tests/twisted/tubes/crash-on-list-channels.py
@@ -61,8 +61,5 @@ def test(q, bus, conn, stream):
 
     conn.ListChannels()
 
-    call_async(q, conn, 'Disconnect')
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/tubes/create-invalid-tube-channels.py b/tests/twisted/tubes/create-invalid-tube-channels.py
index 1704242..4fd97d2 100644
--- a/tests/twisted/tubes/create-invalid-tube-channels.py
+++ b/tests/twisted/tubes/create-invalid-tube-channels.py
@@ -47,9 +47,5 @@ def test(q, bus, conn, stream):
 
     check_no_tubes(conn_props)
 
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/tubes/ensure-si-tube.py b/tests/twisted/tubes/ensure-si-tube.py
index f472686..ac814e6 100644
--- a/tests/twisted/tubes/ensure-si-tube.py
+++ b/tests/twisted/tubes/ensure-si-tube.py
@@ -124,9 +124,5 @@ def test(q, bus, conn, stream):
     chan = bus.get_object(conn.bus_name, path)
     chan.Close()
 
-    # OK, we're done
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/tubes/muc-presence.py b/tests/twisted/tubes/muc-presence.py
index 9bc6336..85769ca 100644
--- a/tests/twisted/tubes/muc-presence.py
+++ b/tests/twisted/tubes/muc-presence.py
@@ -18,10 +18,5 @@ def test(q, bus, conn, stream):
 
     conn.Presence.SetStatus({'away':{'message':'Christmas lunch!'}})
 
-    # If Gabble didn't crash, we're done.
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/tubes/offer-muc-dbus-tube.py b/tests/twisted/tubes/offer-muc-dbus-tube.py
index ca9622e..c2ee88d 100644
--- a/tests/twisted/tubes/offer-muc-dbus-tube.py
+++ b/tests/twisted/tubes/offer-muc-dbus-tube.py
@@ -343,11 +343,6 @@ def test(q, bus, conn, stream, access_control):
         EventPattern('dbus-signal', signal='Closed'),
         EventPattern('dbus-signal', signal='ChannelClosed'))
 
-    # OK, we're done
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     # We can't use t.exec_dbus_tube_test() as we can use only the muc bytestream
     exec_test(lambda q, bus, conn, stream:
diff --git a/tests/twisted/tubes/offer-muc-stream-tube.py b/tests/twisted/tubes/offer-muc-stream-tube.py
index 1dee574..321f381 100644
--- a/tests/twisted/tubes/offer-muc-stream-tube.py
+++ b/tests/twisted/tubes/offer-muc-stream-tube.py
@@ -345,10 +345,5 @@ def test(q, bus, conn, stream, bytestream_cls,
         EventPattern('dbus-signal', signal='Closed'),
         EventPattern('dbus-signal', signal='ChannelClosed'))
 
-    # OK, we're done
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     t.exec_stream_tube_test(test)
diff --git a/tests/twisted/tubes/offer-no-caps.py b/tests/twisted/tubes/offer-no-caps.py
index 3b9783d..e9eb5b6 100644
--- a/tests/twisted/tubes/offer-no-caps.py
+++ b/tests/twisted/tubes/offer-no-caps.py
@@ -108,7 +108,5 @@ def test(q, bus, conn, stream):
     e = q.expect('dbus-error', method='Offer').error
     assert e.get_dbus_name() == cs.NOT_AVAILABLE, e.get_dbus_name()
 
-    conn.Disconnect()
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/tubes/offer-private-dbus-tube.py b/tests/twisted/tubes/offer-private-dbus-tube.py
index 32c71b5..5756cd5 100644
--- a/tests/twisted/tubes/offer-private-dbus-tube.py
+++ b/tests/twisted/tubes/offer-private-dbus-tube.py
@@ -311,9 +311,5 @@ def test(q, bus, conn, stream, bytestream_cls, access_control):
     offer_old_dbus_tube(q, bus, conn, stream, self_handle, alice_handle, bytestream_cls)
     offer_new_dbus_tube(q, bus, conn, stream, self_handle, alice_handle, bytestream_cls, access_control)
 
-    # OK, we're done
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     t.exec_dbus_tube_test(test)
diff --git a/tests/twisted/tubes/offer-private-stream-tube.py b/tests/twisted/tubes/offer-private-stream-tube.py
index 6ef3fd3..1099fbd 100644
--- a/tests/twisted/tubes/offer-private-stream-tube.py
+++ b/tests/twisted/tubes/offer-private-stream-tube.py
@@ -419,10 +419,5 @@ def test(q, bus, conn, stream, bytestream_cls,
     assertEquals(conn_id, e.args[0])
     assertEquals(cs.CONNECTION_LOST, e.args[1])
 
-    # OK, we're done
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     t.exec_stream_tube_test(test)
diff --git a/tests/twisted/tubes/test-get-available-tubes.py b/tests/twisted/tubes/test-get-available-tubes.py
index cff5150..d9a8289 100644
--- a/tests/twisted/tubes/test-get-available-tubes.py
+++ b/tests/twisted/tubes/test-get-available-tubes.py
@@ -101,11 +101,5 @@ def test(q, bus, conn, stream):
         dbus_interface=cs.PROPERTIES_IFACE)
     assertEquals(sockets, stream_tubes_types)
 
-    # OK, we're done
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged',
-        args=[cs.CONN_STATUS_DISCONNECTED, cs.CSR_REQUESTED])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/tubes/test-socks5-muc.py b/tests/twisted/tubes/test-socks5-muc.py
index 56a381a..e58184e 100644
--- a/tests/twisted/tubes/test-socks5-muc.py
+++ b/tests/twisted/tubes/test-socks5-muc.py
@@ -74,10 +74,5 @@ def test(q, bus, conn, stream):
         # the proxy is not announced because we are in a muc
         assert jid != 'proxy.localhost'
 
-    # OK, we're done
-    conn.Disconnect()
-
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/vcard/test-alias-empty-vcard.py b/tests/twisted/vcard/test-alias-empty-vcard.py
index 2460a14..19f1569 100644
--- a/tests/twisted/vcard/test-alias-empty-vcard.py
+++ b/tests/twisted/vcard/test-alias-empty-vcard.py
@@ -42,9 +42,5 @@ def test(q, bus, conn, stream):
     # A second request should be satisfied from the cache.
     assert conn.Aliasing.RequestAliases([handle]) == ['bob at foo.com']
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/vcard/test-alias-pep.py b/tests/twisted/vcard/test-alias-pep.py
index 478ec77..68c32f4 100644
--- a/tests/twisted/vcard/test-alias-pep.py
+++ b/tests/twisted/vcard/test-alias-pep.py
@@ -67,10 +67,5 @@ def test(q, bus, conn, stream):
     # their JID.
     assertEquals(a, 'bob at foo.com')
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged',
-        args=[cs.CONN_STATUS_DISCONNECTED, cs.CSR_REQUESTED]),
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/vcard/test-alias.py b/tests/twisted/vcard/test-alias.py
index 573142b..156ccc0 100644
--- a/tests/twisted/vcard/test-alias.py
+++ b/tests/twisted/vcard/test-alias.py
@@ -46,9 +46,5 @@ def test(q, bus, conn, stream):
     # A second request should be satisfied from the cache.
     assert conn.Aliasing.RequestAliases([handle]) == ['Bobby']
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/vcard/test-avatar-async.py b/tests/twisted/vcard/test-avatar-async.py
index af768a9..f0d2e97 100644
--- a/tests/twisted/vcard/test-avatar-async.py
+++ b/tests/twisted/vcard/test-avatar-async.py
@@ -45,9 +45,5 @@ def test(q, bus, conn, stream):
     assert event.args[2] == 'hello'
     assert event.args[3] == 'image/png'
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/vcard/test-avatar-tokens.py b/tests/twisted/vcard/test-avatar-tokens.py
index 7fef5fd..f461773 100644
--- a/tests/twisted/vcard/test-avatar-tokens.py
+++ b/tests/twisted/vcard/test-avatar-tokens.py
@@ -53,9 +53,5 @@ def test(q, bus, conn, stream):
     tokens = sorted(tokens.items())
     assert tokens == [(2, 'SHA1SUM-FOR-AMY'), (3, 'SHA1SUM-FOR-BOB'), (4, u'')]
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/vcard/test-avatar.py b/tests/twisted/vcard/test-avatar.py
index bb899e7..576d647 100644
--- a/tests/twisted/vcard/test-avatar.py
+++ b/tests/twisted/vcard/test-avatar.py
@@ -31,9 +31,5 @@ def test(q, bus, conn, stream):
     q.expect('dbus-return', method='RequestAvatar',
         value=('hello', 'image/png'))
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/vcard/test-save-alias-to-vcard.py b/tests/twisted/vcard/test-save-alias-to-vcard.py
index 9b5af31..fa60248 100644
--- a/tests/twisted/vcard/test-save-alias-to-vcard.py
+++ b/tests/twisted/vcard/test-save-alias-to-vcard.py
@@ -24,9 +24,5 @@ def test(q, bus, conn, stream):
 
     expect_and_handle_set_vcard(q, stream, check_vcard)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test, params={'alias': 'Some Guy'})
-
diff --git a/tests/twisted/vcard/test-set-alias.py b/tests/twisted/vcard/test-set-alias.py
index d7fec77..28dc0be 100644
--- a/tests/twisted/vcard/test-set-alias.py
+++ b/tests/twisted/vcard/test-set-alias.py
@@ -24,9 +24,5 @@ def test(q, bus, conn, stream):
     event = q.expect('dbus-signal', signal='AliasesChanged',
         args=[[(1, u'lala')]])
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/vcard/test-vcard-cache.py b/tests/twisted/vcard/test-vcard-cache.py
index 10313ef..d396409 100644
--- a/tests/twisted/vcard/test-vcard-cache.py
+++ b/tests/twisted/vcard/test-vcard-cache.py
@@ -43,9 +43,5 @@ def test(q, bus, conn, stream):
         r2.error.get_dbus_name()
     assert r2.error.args[0] == 'contact vCard has no photo'
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
-
diff --git a/tests/twisted/vcard/test-vcard-race.py b/tests/twisted/vcard/test-vcard-race.py
index 0db7756..78e4e49 100644
--- a/tests/twisted/vcard/test-vcard-race.py
+++ b/tests/twisted/vcard/test-vcard-race.py
@@ -58,8 +58,5 @@ def test(q, bus, conn, stream):
     # Now Gabble should set a new vCard with both of the above changes.
     expect_and_handle_set_vcard(q, stream, has_nickname_and_photo)
 
-    conn.Disconnect()
-    q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/vcard/update-rejected.py b/tests/twisted/vcard/update-rejected.py
index 0431de6..c32b310 100644
--- a/tests/twisted/vcard/update-rejected.py
+++ b/tests/twisted/vcard/update-rejected.py
@@ -36,7 +36,5 @@ def test(q, bus, conn, stream):
     assert event.error.get_dbus_name() == cs.INVALID_ARGUMENT, \
         event.error.get_dbus_name()
 
-    conn.Disconnect()
-
 if __name__ == '__main__':
     exec_test(test)
-- 
1.5.6.5




More information about the telepathy-commits mailing list