summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-08-02 17:33:39 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-02 17:33:39 (GMT)
commit11c127dac776955e4b31a4bf50f660169009a58e (patch)
tree978e294e85ffd87b2570f6376b893b0e3fd70435
parent92f2e80a211396981a276e170c958520a6636853 (diff)
downloadconnman-11c127dac776955e4b31a4bf50f660169009a58e.zip
connman-11c127dac776955e4b31a4bf50f660169009a58e.tar.gz
connman-11c127dac776955e4b31a4bf50f660169009a58e.tar.bz2
Fix test-manager
-rwxr-xr-xtest/test-manager35
1 files changed, 33 insertions, 2 deletions
diff --git a/test/test-manager b/test/test-manager
index 92f7085..b5a2530 100755
--- a/test/test-manager
+++ b/test/test-manager
@@ -2,6 +2,24 @@
import dbus
+def extract_values(values):
+ val = "{"
+ for key in values.keys():
+ val += " " + key + "="
+ if key in ["PrefixLength"]:
+ val += "%s" % (int(values[key]))
+ else:
+ val += str(values[key])
+ val += " }"
+ return val
+
+def extract_list(list):
+ val = "["
+ for i in list:
+ val += " " + str(i)
+ val += " ]"
+ return val
+
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
@@ -34,12 +52,25 @@ def print_properties(key, value):
"Providers", "Technologies"]:
continue
- if key in ["Powered", "Scanning", "Connected",
- "Available", "Remember", "Default"]:
+ elif key in ["Powered", "Scanning", "Connected",
+ "Available", "Remember", "Default",
+ "Favorite", "Immutable", "AutoConnect",
+ "LoginRequired", "SetupRequired",
+ "PassphraseRequired"]:
if properties[key] == dbus.Boolean(1):
val = "true"
else:
val = "false"
+
+ elif key in ["IPv4", "IPv4.Configuration",
+ "IPv6", "IPv6.Configuration",
+ "Proxy", "Ethernet", "Provider"]:
+ val = extract_values(properties[key])
+
+ elif key in ["Nameservers", "Nameservers.Configuration",
+ "Domains", "Domains.Configuration"]:
+ val = extract_list(properties[key])
+
elif key in ["Strength", "Priority"]:
val = int(properties[key])
else: