From 0f939f33345fa582671a1d606edcbc18cb7e066c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 25 Sep 2013 18:43:28 +0100 Subject: [PATCH 2/5] Fix comments that talk about MC calling GetStatus We don't assume that GetStatus will be called, but if we did, it'd be one more thing to port to next. Delete the comments to avoid confusion. --- tests/twisted/account-manager/reconnect.py | 4 ++-- tests/twisted/account-manager/recover-from-disconnect.py | 8 ++++---- tests/twisted/account-manager/request-online.py | 3 ++- tests/twisted/account-manager/server-drops-us.py | 8 ++++---- tests/twisted/account-manager/update-parameters.py | 4 ++-- tests/twisted/dispatcher/recover-from-disconnect.py | 8 ++++---- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/tests/twisted/account-manager/reconnect.py b/tests/twisted/account-manager/reconnect.py index cf27a42..64a3459 100644 --- a/tests/twisted/account-manager/reconnect.py +++ b/tests/twisted/account-manager/reconnect.py @@ -125,8 +125,8 @@ def test(q, bus, mc): path=conn.object_path, handled=True), ) - # MC calls GetStatus (maybe) and then Connect - + # MC prepares the connection, does any pre-Connect setup, then + # calls Connect q.expect('dbus-method-call', method='Connect', path=conn.object_path, handled=True) diff --git a/tests/twisted/account-manager/recover-from-disconnect.py b/tests/twisted/account-manager/recover-from-disconnect.py index b808321..186d13d 100644 --- a/tests/twisted/account-manager/recover-from-disconnect.py +++ b/tests/twisted/account-manager/recover-from-disconnect.py @@ -55,8 +55,8 @@ def test(q, bus, mc): q.dbus_return(e.message, conn.bus_name, conn.object_path, signature='so') - # MC calls GetStatus (maybe) and then Connect - + # MC prepares the connection, does any pre-Connect setup, then + # calls Connect q.expect('dbus-method-call', method='Connect', path=conn.object_path, handled=True) @@ -130,8 +130,8 @@ def test(q, bus, mc): q.dbus_return(e.message, conn.bus_name, conn.object_path, signature='so') - # MC calls GetStatus (maybe) and then Connect - + # MC prepares the connection, does any pre-Connect setup, then + # calls Connect connecting, _ = q.expect_many( EventPattern('dbus-signal', signal='AccountPropertyChanged', predicate=(lambda e: diff --git a/tests/twisted/account-manager/request-online.py b/tests/twisted/account-manager/request-online.py index deea79c..94a0b83 100644 --- a/tests/twisted/account-manager/request-online.py +++ b/tests/twisted/account-manager/request-online.py @@ -102,8 +102,9 @@ def test(q, bus, mc): args=[cs.CONN_IFACE_REQUESTS], path=conn.object_path, handled=True), ) - # MC calls GetStatus (maybe) and then Connect + # MC prepares the connection, does any pre-Connect setup, then + # calls Connect q.expect('dbus-method-call', method='Connect', path=conn.object_path, handled=True) diff --git a/tests/twisted/account-manager/server-drops-us.py b/tests/twisted/account-manager/server-drops-us.py index c218afe..30ce62a 100644 --- a/tests/twisted/account-manager/server-drops-us.py +++ b/tests/twisted/account-manager/server-drops-us.py @@ -66,8 +66,8 @@ def test(q, bus, mc): q.dbus_return(e.message, conn.bus_name, conn.object_path, signature='so') - # MC calls GetStatus (maybe) and then Connect - + # MC prepares the connection, does any pre-Connect setup, then + # calls Connect q.expect('dbus-method-call', method='Connect', path=conn.object_path, handled=True) @@ -114,8 +114,8 @@ def drop_and_expect_reconnect(q, bus, conn): q.dbus_return(e.message, conn.bus_name, conn.object_path, signature='so') - # MC calls GetStatus (maybe) and then Connect - + # MC prepares the connection, does any pre-Connect setup, then + # calls Connect q.expect('dbus-method-call', method='Connect', path=conn.object_path, handled=True) diff --git a/tests/twisted/account-manager/update-parameters.py b/tests/twisted/account-manager/update-parameters.py index 7bc4e47..7249532 100644 --- a/tests/twisted/account-manager/update-parameters.py +++ b/tests/twisted/account-manager/update-parameters.py @@ -77,8 +77,8 @@ def test(q, bus, mc, **kwargs): path=conn.object_path, handled=True), ) - # MC calls GetStatus (maybe) and then Connect - + # MC prepares the connection, does any pre-Connect setup, then + # calls Connect q.expect('dbus-method-call', method='Connect', path=conn.object_path, handled=True) diff --git a/tests/twisted/dispatcher/recover-from-disconnect.py b/tests/twisted/dispatcher/recover-from-disconnect.py index 87c85d6..4816771 100644 --- a/tests/twisted/dispatcher/recover-from-disconnect.py +++ b/tests/twisted/dispatcher/recover-from-disconnect.py @@ -93,8 +93,8 @@ def test(q, bus, mc): path=conn.object_path, handled=True), ) - # MC calls GetStatus (maybe) and then Connect - + # MC prepares the connection, does any pre-Connect setup, then + # calls Connect q.expect('dbus-method-call', method='Connect', path=conn.object_path, handled=True) @@ -128,8 +128,8 @@ def test(q, bus, mc): path=conn.object_path, handled=True), ) - # MC calls GetStatus (maybe) and then Connect - + # MC prepares the connection, does any pre-Connect setup, then + # calls Connect q.expect('dbus-method-call', method='Connect', path=conn.object_path, handled=True) -- 1.8.4.rc3