summaryrefslogtreecommitdiff
path: root/tests/twisted/account-manager/update-parameters.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/twisted/account-manager/update-parameters.py')
-rw-r--r--tests/twisted/account-manager/update-parameters.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/twisted/account-manager/update-parameters.py b/tests/twisted/account-manager/update-parameters.py
index a7ec6a0a..a030a01f 100644
--- a/tests/twisted/account-manager/update-parameters.py
+++ b/tests/twisted/account-manager/update-parameters.py
@@ -30,16 +30,13 @@ from mctest import exec_test, SimulatedConnection, create_fakecm_account,\
import constants as cs
def test(q, bus, mc, **kwargs):
- cm_name_ref = dbus.service.BusName(
- tp_name_prefix + '.ConnectionManager.fakecm', bus=bus)
-
# Create an account
params = dbus.Dictionary(
{"account": "someguy@example.com",
"password": "secrecy",
"nickname": "albinoblacksheep",
}, signature='sv')
- (cm_name_ref, account) = create_fakecm_account(q, bus, mc, params)
+ (simulated_cm, account) = create_fakecm_account(q, bus, mc, params)
# Enable the account
account.Set(cs.ACCOUNT, 'Enabled', True,
@@ -77,13 +74,13 @@ 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)
# Connect succeeds
- conn.StatusChanged(cs.CONN_STATUS_CONNECTED, cs.CONN_STATUS_REASON_NONE)
+ conn.StatusChanged(cs.CONN_STATUS_CONNECTED, cs.CSR_NONE_SPECIFIED)
# Assert that the NormalizedName is harvested from the Connection at some
# point
@@ -255,13 +252,11 @@ def test(q, bus, mc, **kwargs):
assertEquals(r'\\',
kwargs['fake_accounts_service'].accounts
[account.object_path[len(cs.ACCOUNT_PATH_PREFIX):]]
- [2] # parameters of known type
- ['account'])
+ .params['account'])
assertEquals(None,
kwargs['fake_accounts_service'].accounts
[account.object_path[len(cs.ACCOUNT_PATH_PREFIX):]]
- [3] # parameters of unknown type
- .get('account', None))
+ .untyped_params.get('account', None))
if __name__ == '__main__':
exec_test(test, {}, pass_kwargs=True)