test: Add option to also enable other than the first context

This commit is contained in:
Marcel Holtmann 2010-10-21 21:44:51 +02:00
parent 56d46ae16b
commit fcc064e55c
2 changed files with 8 additions and 2 deletions

View File

@ -25,6 +25,9 @@ for path, properties in modems:
connman.SetProperty("Powered", dbus.Boolean(1))
if len(sys.argv) > 1:
path = contexts[int(sys.argv[1])][0]
else:
path = contexts[0][0]
context = dbus.Interface(bus.get_object('org.ofono', path),

View File

@ -23,6 +23,9 @@ for path, properties in modems:
print "No context available"
sys.exit(1)
if len(sys.argv) > 1:
path = contexts[int(sys.argv[1])][0]
else:
path = contexts[0][0]
context = dbus.Interface(bus.get_object('org.ofono', path),