test: Fix tethering scripts
[framework/connectivity/connman.git] / test / test-manager
index 6c694a0..a29eaf7 100755 (executable)
@@ -25,25 +25,25 @@ def extract_list(list):
 
 bus = dbus.SystemBus()
 
-manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
-                                       "org.moblin.connman.Manager")
+manager = dbus.Interface(bus.get_object("net.connman", "/"),
+                                       "net.connman.Manager")
 
 properties = manager.GetProperties()
 
 def print_properties(key, value):
        if key == "Profiles":
-               interface = "org.moblin.connman.Profile"
+               interface = "net.connman.Profile"
        elif key == "Services":
-               interface = "org.moblin.connman.Service"
+               interface = "net.connman.Service"
        elif key == "Technologies":
-               interface = "org.moblin.connman.Technology"
+               interface = "net.connman.Technology"
        else:
                return
 
        print "%s" % (key)
        for path in value:
                print "    %s" % (path)
-               obj = dbus.Interface(bus.get_object("org.moblin.connman", path),
+               obj = dbus.Interface(bus.get_object("net.connman", path),
                                                                interface)
 
                properties = obj.GetProperties()
@@ -56,7 +56,7 @@ def print_properties(key, value):
                                        "Available", "Remember", "Default",
                                        "Favorite", "Immutable", "AutoConnect",
                                                "LoginRequired", "SetupRequired",
-                                                       "PassphraseRequired"]:
+                                               "PassphraseRequired"]:
                                if properties[key] == dbus.Boolean(1):
                                        val = "true"
                                else:
@@ -69,11 +69,18 @@ def print_properties(key, value):
                                val = extract_values(properties[key])
 
                        elif key in ["Nameservers", "Nameservers.Configuration",
-                                       "Domains", "Domains.Configuration"]:
+                                       "Domains", "Domains.Configuration",
+                                               "Security"]:
                                val = extract_list(properties[key])
 
                        elif key in ["Strength", "Priority"]:
                                val = int(properties[key])
+
+                       elif key in ["Tethering"]:
+                               if properties[key] == dbus.Boolean(1):
+                                       val = "true"
+                               else:
+                                       val = "false"
                        else:
                                val = str(properties[key])