diff options
author | Dan Williams <dcbw@redhat.com> | 2009-11-29 22:45:03 -0800 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2009-11-29 22:45:03 -0800 |
commit | 3890009bcc15a9524fdd17cdb6c8ec7f1b879f31 (patch) | |
tree | 5fefee88ef76e9cdb81933b5916e41cb2fcc89a4 /test/mm-test.py | |
parent | 01db3f1c2fad716088563fb7e91720691fd962d4 (diff) |
test: actually send username and password when connecting
Diffstat (limited to 'test/mm-test.py')
-rwxr-xr-x | test/mm-test.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/mm-test.py b/test/mm-test.py index bbd634df..cb9ecf0a 100755 --- a/test/mm-test.py +++ b/test/mm-test.py @@ -229,7 +229,12 @@ def gsm_connect(proxy, apn, user, password): # Modem.Simple interface simple = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_MODEM_SIMPLE) try: - simple.Connect({'apn': apn, 'number':"*99#"}, timeout=120) + opts = {'apn': apn, 'number':"*99#"} + if user is not None: + opts['username'] = user + if password is not None: + opts['password'] = password + simple.Connect(opts, timeout=120) print "\nConnected!" except Exception, e: print "Error connecting: %s" % e |