test: Add script for hanging up active call

This commit is contained in:
Marcel Holtmann 2010-09-29 08:08:09 +09:00
parent 5269a2f9be
commit ba2fd65b5e
2 changed files with 24 additions and 0 deletions

View File

@ -341,6 +341,7 @@ test_scripts = test/backtrace \
test/enable-modem \
test/enter-pin \
test/hangup-all \
test/hangup-active \
test/set-context \
test/list-contexts \
test/list-modems \

23
test/hangup-active Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/python
import sys
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
modems = manager.GetModems()
path = modems[0][0]
manager = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCallManager')
calls = manager.GetCalls()
path = calls[0][0]
call = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCall')
call.Hangup()