Add simple test script to cancel USSD transactions
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 16 Aug 2010 15:07:28 +0000 (17:07 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 16 Aug 2010 15:07:28 +0000 (17:07 +0200)
Makefile.am
test/cancel-ussd [new file with mode: 0755]

index 97d17d2..d704768 100644 (file)
@@ -336,8 +336,9 @@ test_scripts = test/activate-context \
                test/test-ss-control-cb \
                test/test-ss-control-cf \
                test/test-ss-control-cs \
-               test/test-ussd \
                test/test-voicecall \
+               test/test-ussd \
+               test/cancel-ussd \
                test/offline-modem \
                test/online-modem \
                test/get-tech-preference \
diff --git a/test/cancel-ussd b/test/cancel-ussd
new file mode 100755 (executable)
index 0000000..3bccb98
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+
+import sys
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+                                               'org.ofono.Manager')
+
+properties = manager.GetProperties()
+
+path = properties["Modems"][0]
+
+ussd = dbus.Interface(bus.get_object('org.ofono', path),
+                                       'org.ofono.SupplementaryServices')
+
+ussd.Cancel()