Add test script to enable/disable use of delivery reports

This commit is contained in:
Marcel Holtmann 2010-06-09 19:04:25 -07:00
parent 86caf654de
commit 8ba790b761
2 changed files with 25 additions and 0 deletions

View File

@ -337,6 +337,7 @@ test_scripts = test/activate-context \
test/online-modem \
test/get-tech-preference \
test/set-tech-preference \
test/set-use-sms-reports \
test/set-cbs-topics \
test/enable-cbs

24
test/set-use-sms-reports Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/python
import dbus
import sys
bus = dbus.SystemBus()
if len(sys.argv) == 3:
path = sys.argv[1]
enabled = sys.argv[2]
elif len(sys.argv) == 2:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
properties = manager.GetProperties()
path = properties["Modems"][0]
enabled = sys.argv[1]
else:
print "%s [PATH] topics" % (sys.argv[0])
print "Setting delivery report use for modem %s..." % path
sms = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.SmsManager')
sms.SetProperty("UseDeliveryReports", dbus.Boolean(enabled));