summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-04-20 13:57:03 +0300
committerMarcel Holtmann <marcel@holtmann.org>2012-04-20 13:25:11 +0200
commit2734c403782e371adb1d9dc1016de0ebda86d166 (patch)
treefd89a34a3dc1be2ef0c89ddd15a4ecbd55080f34 /test
parent192b4476be18e482f0f1b2f454e1bf542660558c (diff)
downloadconnman-2734c403782e371adb1d9dc1016de0ebda86d166.tar.gz
connman-2734c403782e371adb1d9dc1016de0ebda86d166.tar.bz2
connman-2734c403782e371adb1d9dc1016de0ebda86d166.zip
test: Cannot set both name and passphrase
simple-agent could not be used to return both the Name and Passphrase fields for hidden psk networks. Fixes BMC#25058
Diffstat (limited to 'test')
-rwxr-xr-xtest/simple-agent14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/simple-agent b/test/simple-agent
index dac1fed0..7b0f5aa6 100755
--- a/test/simple-agent
+++ b/test/simple-agent
@@ -102,16 +102,14 @@ class Agent(dbus.service.Object):
def RequestInput(self, path, fields):
print "RequestInput (%s,%s)" % (path, fields)
- response = None
+ response = {}
if fields.has_key("Name"):
- response = self.input_hidden()
- elif fields.has_key("Passphrase"):
- response = self.input_passphrase()
- elif fields.has_key("Username"):
- response = self.input_username()
- else:
- print "No method to answer the input request"
+ response.update(self.input_hidden())
+ if fields.has_key("Passphrase"):
+ response.update(self.input_passphrase())
+ if fields.has_key("Username"):
+ response.update(self.input_username())
print "returning (%s)" % (response)