test: Fix scan method to work against technology api in test-connman
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tue, 14 Feb 2012 08:28:36 +0000 (10:28 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 14 Feb 2012 13:55:56 +0000 (14:55 +0100)
test/test-connman

index b36b4c5..e2ff23a 100755 (executable)
@@ -18,7 +18,7 @@ if len(sys.argv) < 2:
        print "  disconnect <service>"
        print "  remove <service>"
        print ""
-       print "  scan [type]"
+       print "  scan <type>"
        print "  enable <type>"
        print "  disable <type>"
        print "  offlinemode [on|off]"
@@ -140,9 +140,10 @@ elif sys.argv[1] in ["remove"]:
 
 elif sys.argv[1] == "scan":
        if len(sys.argv) > 2:
-               manager.RequestScan(sys.argv[2])
-       else:
-               manager.RequestScan("")
+               path = "/net/connman/technology/" + sys.argv[2]
+               technology = dbus.Interface(bus.get_object("net.connman", path),
+                                               "net.connman.Technology")
+               technology.Scan()
 
 elif sys.argv[1] == "enable":
        if len(sys.argv) > 2: