test: update process-context-settings to the new API
authorDenis Kenzior <denkenz@gmail.com>
Thu, 19 Aug 2010 18:25:20 +0000 (13:25 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 19 Aug 2010 19:20:06 +0000 (14:20 -0500)
test/process-context-settings

index 9bdde07..67e679e 100755 (executable)
@@ -16,20 +16,15 @@ for path in properties["Modems"]:
 
        properties = modem.GetProperties()
 
-       if "org.ofono.DataConnectionManager" not in properties["Interfaces"]:
+       if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
                continue
 
-       connmgr = dbus.Interface(bus.get_object('org.ofono', path),
-                                       'org.ofono.DataConnectionManager')
+       connman = dbus.Interface(bus.get_object('org.ofono', path),
+                                       'org.ofono.ConnectionManager')
 
-       properties = connmgr.GetProperties()
-
-       for path in properties["PrimaryContexts"]:
-               context = dbus.Interface(bus.get_object('org.ofono', path),
-                                       'org.ofono.PrimaryDataContext')
-
-               properties = context.GetProperties()
+       contexts = connman.GetContexts()
 
+       for path, properties in contexts:
                if properties["Active"] == dbus.Boolean(0):
                        continue